[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partitioning



On Tue, Aug 27, 2002 at 10:52:49PM -0400, Harland Christofferson wrote:
> somehow, when installing Woody, I messed up partitioning. Can my system
> be saved w/o having to reinstall Linux? I have tried parted and sfdisk
> but am unsure what to do.

From prior experience with having done something similar, I think you
could do it by making /dev/hda1=/boot, /dev/hda6=/ (combined with
/home), /dev/hda7=/usr.

To do this you would need to do something like:
1) backup your system
2) boot from rescue floppy or a tomsrtbt floppy
3) create some subdirectories /mnt/1, /mnt/6,  /mnt/7, and /mnt/8.
4) mount /dev/hda1 on /mnt/1
5) mount /dev/hda6 on /mnt/6
6) mount /dev/hda7 on /mnt/7
7) mount /dev/hda8 on /mnt/8
8) create a directory /mnt/var/tmphold
9) move files from /mnt/6 to /mnt/var/tmphold
10) move files from /mnt/1 to /mnt/6
11) move files from /mnt/7 to /mnt/1
12) move files from /mnt/var/tmphold to /mnt/7
13) rmdir /mnt/var/tmphold
14) umount the partitions and run fdisk or somthing similar to make
/dev/hda6 bootable.
15) mount /dev/hda6 on /mnt/6
16) mount /dev/hda1 on /mnt/6/boot
17) mount /dev/hda7 on /mnt/6/usr
18) mount /dev/hda8 on /mnt/6/var
19) edit /mnt/6/etc/fstab to reflect your new partition setup:
/dev/hda1=/boot, /dev/hda6=/, /dev/hda7=/usr, and /dev/hda9=/var.
20) check symlinks to make sure they are correct and fix if necessary.
21) assuming you use lilo, edit /mnt/6/etc/lilo.conf to change
"root=/dev/hda1" to "root=/dev/hda6" and make any other changes you need
for new partition scheme.
22) run lilo by "chroot /mnt/6 /sbin/lilo"
23) umount all the partitions
24) reboot 

It would probably be better to break /dev/hda6 into two partitions, 
one for / and one for /home, rather than combining them in one partition.

> 
> $df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda1              30M   29M     0 100% /
> /dev/hda6              18G  322M   17G   2% /usr
> /dev/hda7             9.2G  1.4M  8.7G   1% /boot
> /dev/hda8             9.6G  127M  8.9G   2% /var
[snip]

good luck 

-- 
Jerome

Attachment: pgp9GjzS_Veio.pgp
Description: PGP signature


Reply to: