Partitions, MBR, etc.
Mark Street
jet at sonic.net
Fri Aug 9 22:57:47 PDT 2002
How many distros do you want to install.... 4 max? Let's see...... I
would move the installed Linux system back to hda1. First change its
partition type and format it with your favorite filesystem. Take the
system down to single user and either tar or cp -a everything to hda1 from
each partition you have Linux installed on. Edit /etc/fstab on hda1 and
point / at hda1 comment out the /hda8 entry, edit /etc/lilo.conf on
/dev/hda1 and re-run lilo. Leave swap there for now. Reboot and pray...
you did make a boot disk didn't you? Make sure it works...
Technically you could create 1or 2 more primary partitions... or go right
for the extended partition.
Now... swap is hanging down there at /dev/hda7 ..... you would probably
want it close to the center of the disk after all is said and done. 9G down
from the top or so.
You need a plan man. Once you back out and clear the deck. 4 - 4.5G
systems would be peachy. To give yourself flexibility I would go with just
a / partiton.
At 01:37 PM 8/9/2002 -0700, Rick wrote:
>I want to repartition a 20 GB hard drive.
>The goal is to load and experiment with
>one or more additional linux distributions,
>while preserving data in existing partitions.
>Backups are impractical, as only floppy is
>available.
Are you going to install Linux only? Min. partitions is 2, / and
swap. swap can be common.... or are you planning to get creative with
partitioning schemes...
>Q 1. Is there a simple way to backup and
>restore the MBR, using floppy, to stave off
>potential disaster?
Not that it will stave off disaster...backup MBR
dd if=/dev/hda of=mbr.img bs=512 count=1
>fdisk shows the existing layout :
>
>Disk /dev/hda: 255 heads, 63 sectors, 2482 cylinders
>Units = cylinders of 16065 * 512 bytes
>
> Device Boot Start End Blocks Id System
>/dev/hda1 * 1 243 1951866 b Win95 FAT32
>/dev/hda2 244 2481 17976735 f Win95 Ext'd (LBA)
>/dev/hda5 858 2481 13044748+ b Win95 FAT32
>/dev/hda6 244 250 56164+ 83 Linux
>/dev/hda7 251 267 136521 82 Linux swap
>/dev/hda8 268 857 4739143+ 83 Linux
>
>Partition table entries are not in disk order
>
>So, in brief :
>hda1 is unused, is reserved for DOS, but could be converted
>to a linux partition and used for temporary storage.
1.9G on hda1
>hda2 contains hda5,6,7,8.
>hda6,7,8 contain RH v.7.3 boot, swap, and root, respectively.
>hda5 is unused. This is the space to be repartitioned.
>Q 2. Using fdisk, if hda5 is deleted,
>hda6,7,8 are renumbered as hda5,6,7.
>If this is written back to the MBR, my guess is that
>LILO and RH v.7.3 will no longer work?
NO, you must edit /etc/fstab to reflect the anticipated change in
partitions. You must also edit /etc/lilo.conf and rerun lilo.
>Q 3. Using fdisk, if hda5,6,7,8 are deleted,
>and then recreated by specifying start and end cylinders,
>the following layout is produced :
> Device Boot Start End Blocks Id System
>/dev/hda1 * 1 243 1951866 b Win95 FAT32
>/dev/hda2 244 2481 17976735 f Win95 Ext'd (LBA)
>/dev/hda5 858 867 80325 83 Linux
>/dev/hda6 244 250 56196 83 Linux
>/dev/hda7 251 267 136521 82 Linux swap
>/dev/hda8 268 857 4739143+ 83 Linux
>/dev/hda9 868 877 80293+ 83 Linux
>/dev/hda10 878 887 80293+ 83 Linux
>etc...
>The number of blocks reported has changed,
>in particular for hda6.
>If this is written back to the MBR will it continue to work?
>
>Q 4. Can hda7 be used as swap for multiple linux distributions,
>or does each distribution need a dedicated swap partition?
Use a common swap partition as you will not be running them both at the
same time.
>Q 5. Should I reserve a bunch of small partitions below the
>"1024 cylinder barrier" (like hda9,10), to provide a boot point
>for potential future distributions?
>How large do they need to be?
How old is the system. This is less and less of an issue with newer BIOS's
and lilo doesn't give a rip. Better yet use grub.
More information about the talk
mailing list