LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   assigning hard drives letters in lilo (https://www.linuxquestions.org/questions/slackware-14/assigning-hard-drives-letters-in-lilo-577094/)

linuxhippy 08-14-2007 03:44 PM

assigning hard drives letters in lilo
 
My current Slackware server uses a Promise Ultra100TX2 PCI IDE hard drive card and then lilo sees my Slack partition as hde1. I want to use this IDE card elsewhere but don't want to make my server not able to boot. If I pull the card, I would think lilo will not be able to find the boot partition.

Do I just have to boot with a live cd and change /etc/lilo.conf to root = /dev/hda1? If so, how would I then run lilo from a live cd?

jailbait 08-14-2007 04:13 PM

"Do I just have to boot with a live cd and change /etc/lilo.conf to root = /dev/hda1?"

You probably also have to change /etc/fstab

"If so, how would I then run lilo from a live cd?"

Use the chroot command to switch from using / on the liveCD to using / on /dev/hda1. Then run the lilo command. See:

man chroot

-------------------
Steve Stites

linuxhippy 08-14-2007 04:39 PM

easy enough-thanx

onebuck 08-14-2007 04:59 PM

Quote:

Originally Posted by linuxhippy (Post 2858932)
My current Slackware server uses a Promise Ultra100TX2 PCI IDE hard drive card and then lilo sees my Slack partition as hde1. I want to use this IDE card elsewhere but don't want to make my server not able to boot. If I pull the card, I would think lilo will not be able to find the boot partition.

Do I just have to boot with a live cd and change /etc/lilo.conf to root = /dev/hda1? If so, how would I then run lilo from a live cd?

Hi,
Lilo doesn't see the '/dev/hde1', it is assigned via the 'lilo.conf' if that was the recognized device. You then or the install configured the 'lilo.conf' which was written to the 'MBR' of the boot device.

Quote:

excerpt from 'man lilo.conf'

boot=<boot-device>
Sets the name of the device (e.g. a hard disk partition) that
contains the boot sector. If this keyword is omitted, the boot
sector is read from (and possibly written to) the device that is
currently mounted as root. A raid installation is initiated by
specifying a RAID1 device as the boot device; e.g.,
"boot=/dev/md0". Note that LILO version 22.0 and later operate
differently from earlier versions with respect to the actual
location of the boot records.
If you wish to modify the lilo then the easiest way would be to use the Slackware 12 install cd1 to boot the system as if you were going to install.

After you get to the login then from the cli (command line);

Code:

~#mkdir /slacktemp                  #temporary mount point
~#mount /dev/your_device /slacktemp  #this is the device you installed '/' to
~#chroot /slacktemp                  #change to yours
~#cd /slacktemp/etc                  #change to directory with lilo.conf
~#vi lilo.conf                      #edit lilo.conf, if need be
~#lilo -v -t -b /dev/your_device    #sda, hda this will only test
~#lilo -v -b /dev/your_device        #this will write MBR to your_device

You should now be able to re-boot your system.

linuxhippy 08-15-2007 04:43 AM

ok-thank you!


All times are GMT -5. The time now is 08:32 PM.