Jump to content

Removing primary master HDD


Horty
 Share

Recommended Posts

HI,

 

I'm about to remove my primary master HDD (13 gb), which leaves a single 40 gb HDD on the system (currently the primary slave).

The 40 gig drive has Mandrake 10 OE on it, and I am wondering as to how I can get it to boot when I have removed the 13 gb drive.

 

I did a bit of Googling on the subject, and found a couple of ideas to the effect that I go into /etc/fstab and change all hdb entries to hda.

 

Is this likely to work with Mandrake, and do I need to make any changes to lilo?

 

Thankyou.

 

Regards,

Horty

Link to comment
Share on other sites

If you can leave the disk in your system, it will possibly (depending on the BIOS) happily work with only a slave device on your primary ATA channel.

 

In which case you'd only have to create a bootfloppy (Mandrake control center - boot - floppy: /dev/fd0 instead of putting it in the mbr).

 

If not, you'll have to edit the following files:

/etc/fstab

/etc/lilo.conf

For smoothest transition you'd have to run lilo with the indication to take the location of your boot image as it is on your hdb (slave hd), but write that info to the mbr or bootlfoppy as if it will be the master device. There are certainly ways to do so, but this is advanced stuff (I was looking at it and decided to do things the 'easier but more work' way)....

 

Easiest but not cleanest way:

make sure you have a live cd or rescue cd (first installation cd) handy.

Adapt the /etc/fstab to reflect the change from /dev/hdb ==> /dev/hda

modify /etc/lilo.conf

but don't run lilo, it won't work - it will not find the boot files on /dev/hda since they are still on /dev/hdb....

 

Then remove /boot/boot.0200 and other files like that (I have boot.0200 and boot.0300) - AFAICS these are the images that lilo creates and that get written to the mbr/bootfloppy bootsector.

 

Then swap your hd, and boot with your install cd1. Then go into rescue mode, and do: repair bootloader.

That should fix things for you.

 

Note: if you don't delete the boot.0200 (and alike) file(s), the bootloader rescue will actually just use those files and restore the old bootloader - which still refers to hdb, the slave drive on the primary channel.

You can delete those with a rescue mode command line, or with a live cd.

With a live cd you can also restore the bootloader, you can for instance use the command:

lilo -C [path to the lilo.conf with corrected hda definitions]

which will then also create the bootloader in the right way.

 

 

If you're not clear on how to proceed, post your

/etc/fstab

and

/etc/lilo.conf

here, and the result of:

ls -l /boot

Link to comment
Share on other sites

Thanks for your reply, artee.

 

I think I know how to proceed, but I have included my fstab and lilo.conf for reference.

 

Fstab

 

/dev/hdb8 / ext3 defaults 1 1

none /dev/pts devpts mode=0620 0 0

/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0

/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0

none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0

/dev/hda1 /mnt/win_c vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hdb1 /mnt/win_c2 ntfs umask=0,nls=iso8859-15,ro 0 0

/dev/hda5 /mnt/win_d vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hdb5 /mnt/win_d2 ntfs umask=0,nls=iso8859-15,ro 0 0

/dev/hda6 /mnt/win_e vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hdb6 /mnt/win_e2 ntfs umask=0,nls=iso8859-15,ro 0 0

/dev/hda7 /mnt/win_f vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

/dev/hdb7 /mnt/win_f2 ntfs umask=0,nls=iso8859-15,ro 0 0

/dev/hda8 /mnt/win_g vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

none /proc proc defaults 0 0

/dev/hdb9 swap swap defaults 0 0

 

Lilo

 

boot=/dev/hda

default="linux"

prompt

nowarn

timeout=100

message=/boot/message

menu-scheme=wb:bw:wb:bw

image=/boot/vmlinuz

label="linux"

root=/dev/hdb8

initrd=/boot/initrd.img

append="devfs=mount acpi=ht resume=/dev/hdb9 splash=silent"

vga=788

read-only

image=/boot/vmlinuz

label="linux-nonfb"

root=/dev/hdb8

initrd=/boot/initrd.img

append="devfs=mount splash=silent acpi=ht resume=/dev/hdb9"

read-only

other=/dev/hda1

label="windows"

table=/dev/hda

other=/dev/fd0

label="floppy"

unsafe

image=/boot/vmlinuz

label="failsafe"

root=/dev/hdb8

initrd=/boot/initrd.img

append="failsafe splash=silent acpi=ht resume=/dev/hdb9 devfs=nomount"

read-only

 

I'm assuming that I hash out references to hdax, and change hdbx to hdax in both lilo.conf and fstab.

I also have a boot disk on a floppy. Do I need to edit that as well?

 

Thanks again.

Horty

Link to comment
Share on other sites

Your boot disk will not help you, once you take out your hda and put your hdb in the place of hda... the boot disk bootloader has references/pointers to files on hdb...

 

You may be able to boot with the boot disk if your system (motherboard bios) allows booting with only a slave device though. So don't lose this disk for now.

About editing it: no you can't. You could theoretically create a bootflop using lilo (the command) with the references to hdb changed into hda,

 

I'm assuming that I hash out references to hdax, and change hdbx to hdax in both lilo.conf and fstab.

 

Correct.

After doing that, all you have to make sure is to have a live cd or install disc 1 to be able to rescue your system.

 

BTW you didn't do:

ls -l /boot

 

are you inexperienced with the command line? In rescue mode, in case you have to run lilo, you will not have a graphical interface, just text based interface (console)..

Link to comment
Share on other sites

Thanks again for your help, artee.

 

Forgot to include ls -l /boot in the last post. Here it is:

-rw-r--r--  1 root root     512 Sep 18 16:15 boot.0200
-rw-r--r--  1 root root     512 Aug 14 03:07 boot.0300
-rw-r--r--  1 root root     512 Aug 14 03:11 boot.0348
lrwxrwxrwx  1 root root      17 Oct 23 20:59 config -> config-2.6.3-7mdk
-rw-r--r--  1 root root   54087 Mar 17  2004 config-2.6.3-7mdk
-rw-r--r--  1 root root    5032 Feb 19  2004 diag1.img
-rw-r--r--  1 root root   16796 Feb 19  2004 diag2.img
drwxr-xr-x  2 root root    4096 Sep 18 15:26 grub/
-rw-r--r--  1 root root  136149 Aug 14 03:07 initrd-2.6.3-7mdk.img
lrwxrwxrwx  1 root root      21 Sep 18 16:13 initrd.img -> initrd-2.6.3-7mdk.img
lrwxrwxrwx  1 root root      25 Oct 23 21:00 kernel.h -> /boot/kernel.h-2.6.3-7mdk
-rw-r--r--  1 root root     537 Aug 14 03:55 kernel.h-2.6.3-7mdk
-rw-------  1 root root  516096 Oct 22 19:45 map
lrwxrwxrwx  1 root root      15 Oct 22 19:45 message -> message-graphic
-rw-r--r--  1 root root  442273 Aug 14 03:07 message-graphic
-rw-r--r--  1 root root     116 Sep 18 16:15 message-text
lrwxrwxrwx  1 root root      21 Aug 14 03:53 System.map -> System.map-2.6.3-7mdk
-rw-r--r--  1 root root  898908 Mar 17  2004 System.map-2.6.3-7mdk
-rw-r--r--  1 root root     256 Aug 14 03:07 us-latin1.klt
lrwxrwxrwx  1 root root      18 Sep 18 16:13 vmlinuz -> vmlinuz-2.6.3-7mdk
-rw-r--r--  1 root root 1440198 Mar 17  2004 vmlinuz-2.6.3-7mdk

What information can you get from this?

 

 

Regards,

Horty

Link to comment
Share on other sites

-rw-r--r--  1 root root     512 Sep 18 16:15 boot.0200
-rw-r--r--  1 root root     512 Aug 14 03:07 boot.0300
-rw-r--r--  1 root root     512 Aug 14 03:11 boot.0348

 

is what I wanted to see - tells me you do have some files to delete there. (All of those 3 above.)

 

Other things I can tell: you are using the standard 2.6.3-7mdk kernel from 10.0 OE. But I knew that since you mentioned it in your start post... :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...