At 11:45 AM 06/29/01, Frederic Soulier wrote:
>Hi
>
>I have a linux box (setup by someone else) which has only 1 swap
>partition and 1 / partition.
>This machine also has a windows partition.
>I appears I can delete the windows partition (not needed anymore)
>and resize the / partition to get more space for tux.
>
>What would be the best way to achieve that? I have tried this
>once and after resizing lilo could not boot the system.
>note: I have no pbm with the resizing part, only with the lilo part
depending on the size available on the Windoze partition, you could
partition it in 2 parts then use them for /usr and or /home.
the recipe:
Get a copy of Tom's Root n Boot floppy, http://www.toms.net/rb/home.html
then boot from the floppy, mount both drives, all three partitions, use "cp
-a" to copy the old /usr and /home to the new ones.
ie:
mkdir /mnt/old
mkdir /mnt/new
mkdir /mnt/new/usr
mkdir /mnt/new/home
mount -t ext2 /dev/hda1 /mnt/old
mount -t ext2 /dev/hda2 /mnt/new/usr
mount -t ext2 /dev/hda3 /mnt/new/home
cp -a /mnt/old/usr/* /mnt/new/usr
cp -a /mnt/old/home/* /mnt/new/home
I know it looks a little redundant, (could be cp -a /mnt/old/usr /mnt/new/)
but I do that on purpose to minimize mistakes. You may have to adjust that
depending on your hardware and where your new partitions are, how many, etc.
Once that is done, go and edit "/mnt/old/etc/fstab" and add the new /usr
and /home parts, something like "/dev/hda2 /usr ext2 defaults 1 2"
Compare and confirm all your files are in place then "cd /mnt/old/usr",
"pwd" make sure you are where you want to be, and "rm -rf *" the whole
thing. You'll need to leave /usr in place to mount to when you restart, do
the same with /home. Once you are sure everything is in place, remove
tomsrtbt diskette (if you haven't already) and "init 0". Hope I haven't
missed anything. Be careful.
Do not do this live, make sure you do this with a root n boot set, or plug
the drives into another Linux boxen. If you have a tape drive, a backup is
always a good thing, if you care about the data that is there of course.
Good luck.
Scott