Partitions, MBR, etc.

Rick ricklyb at yahoo.com
Mon Aug 12 00:24:21 PDT 2002


Thanks for the wealth of information.  Being new to the *nix world,
many of these details are difficult...

--- Mark Street <jet at sonic.net> wrote:
> 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...

4 distros are sufficient for now, but space for a couple more would 
be nice, to allow for "crash and burn" testing.
Yes, the boot disk works.
But, doesn't this require that the partition table remain unchanged?
So, both hda6(/boot) and hda8(/) should be copied to hda1?
Could you supply the entire tar or cp command, with their options?
/etc/fstab now contains :  (with some blanks deleted to fit...)
LABEL=/             /                ext3    defaults        1 1
LABEL=/boot         /boot            ext3    defaults        1 2
/dev/fd0            /mnt/floppy      auto    noauto,owner    0 0
none                /proc            proc    defaults        0 0
none                /dev/shm         tmpfs   defaults        0 0
none                /dev/pts         devpts  gid=5,mode=620  0 0
/dev/hda7           swap             swap    defaults        0 0
/dev/cdrom          /mnt/cdrom       iso9660 noauto,owner,kudzu,ro 0 0
--- end of /etc/fstab ---
/etc/lilo.conf now contains :
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux

image=/boot/vmlinuz-2.4.18-3
	label=linux
	initrd=/boot/initrd-2.4.18-3.img
	read-only
	root=/dev/hda8

other=/dev/hda1
	optional
	label=DOS

>
> Technically you could create 1or 2 more primary partitions... or go
> right 
> for the extended partition.

I used the extended partition before, to provide uniform treatment
to all...
> 
> 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.

Yes, I agree.  Could you suggest a workable partitioning layout?
> 
> 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...

Originally I left hda1 for DOS.
The simplest partitioning scheme that does the job is the best
solution (I follow the KISS philosophy!)
> 
> 
> >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

Done, and copied to floppy...
> 
> >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.
> 
It sounds like this is a moot question, if RH v.7.3 moves to hda1...
Or was that just an interim step?
> 
> >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.
> 
Great.
> 
> >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.
> 
It's an old Compaq Presario 4770 with an old BIOS.
(no documentation, the BIOS setup seems inaccessible, but the new
20G disk seems to work ok).
I don't know much about either LILO or GRUB.
LILO is installed and works.
Is GRUB easy to install?

Thanks again,
Rick

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the talk mailing list