LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   trying to update lilo on my usb hdd tells me /etc/lilo.conf wasn't found (http://www.linuxquestions.org/questions/slackware-14/trying-to-update-lilo-on-my-usb-hdd-tells-me-etc-lilo-conf-wasnt-found-803559/)

daweefolk 04-22-2010 01:16 PM

trying to update lilo on my usb hdd tells me /etc/lilo.conf wasn't found
 
I installed slackware with lilo on the mbr of /dev/sdb2 (primary linux partition on my usb drive) and I need to go in and change lilo.conf so it gives me a rootdelay=10.
to do so i need to boot from the slackware dvd, mount my usb drive, and edit lilo.conf (done) and re-run /sbin/lilo. When I do this it tells me /etc/lilo.conf doesn't exist.
I think it's because i have /dev/sdb2 mounted to /mnt/linuxsys and /sbin/lilo is looking for lilo.conf at /etc, not /mnt/linuxsys/etc.
Is this probably right? and if so, could making a symlink somewhere help in some way?

hello.freeman 04-22-2010 01:28 PM

Quote:

Originally Posted by daweefolk (Post 3944208)
I installed slackware with lilo on the mbr of /dev/sdb2 (primary linux partition on my usb drive) and I need to go in and change lilo.conf so it gives me a rootdelay=10.
to do so i need to boot from the slackware dvd, mount my usb drive, and edit lilo.conf (done) and re-run /sbin/lilo. When I do this it tells me /etc/lilo.conf doesn't exist.
I think it's because i have /dev/sdb2 mounted to /mnt/linuxsys and /sbin/lilo is looking for lilo.conf at /etc, not /mnt/linuxsys/etc.
Is this probably right? and if so, could making a symlink somewhere help in some way?

You can use this command to install lilo :
lilo -C /mnt/linuxsys/etc/lilo.conf -b /dev/sdb

Make a lilo.conf by yourself if /mnt/linuxsys/etc/lilo.conf doesn't exist.


By the way , executing liloconfig is a very simple way to install it.

daweefolk 04-22-2010 01:31 PM

OK thanks I'll try that. manpages on my computer don't work for some reason yet so I couldn't figure out those options for lilo easily.

LuckyCyborg 04-22-2010 01:53 PM

Quote:

Originally Posted by daweefolk (Post 3944208)
I installed slackware with lilo on the mbr of /dev/sdb2 (primary linux partition on my usb drive) and I need to go in and change lilo.conf so it gives me a rootdelay=10.
to do so i need to boot from the slackware dvd, mount my usb drive, and edit lilo.conf (done) and re-run /sbin/lilo. When I do this it tells me /etc/lilo.conf doesn't exist.
I think it's because i have /dev/sdb2 mounted to /mnt/linuxsys and /sbin/lilo is looking for lilo.conf at /etc, not /mnt/linuxsys/etc.
Is this probably right? and if so, could making a symlink somewhere help in some way?

To create a functional Linux system in a USB hard drive is quite complicated ... because the hard drive devices changes depending on the system where is plugged.

I recommend a UUID based /etc/fstab, and so configuration in /etc/lilo.conf

To run lilo into target partition, is quite simple: lilo -r /target/partition/mountpoint

daweefolk 04-22-2010 02:45 PM

how do i edit lilo.conf so it goes by uuid? sorry for my noobishness lol

LuckyCyborg 04-22-2010 03:05 PM

With PICO, VI or any text editor... ;-)

About UUIDs... It's complicated. :-P

First, in a health system with the usb hard drive plugged in, execute blkid.

You should see something like:

bash-4.1# blkid
/dev/sdb1: UUID="fab6de21-e58c-42c0-a54d-0bdd2bd99467" TYPE="ext4"
/dev/sdb2: UUID="c4e0db68-be9f-409c-8a46-92f860bf0224" TYPE="ext4"
/dev/sdb3: UUID="b799fd2e-6b5b-4613-b357-c8b12f660007" TYPE="ext4"
/dev/sdb4: UUID="c215b80c-81e9-4b62-b668-7dc14d7026bd" TYPE="ext4"
/dev/sdc1: UUID="77ed321c-3366-48b1-aab0-991655f541bf" TYPE="ext4"
/dev/sdd1: LABEL="Windows 7" UUID="A254607654604F5B" TYPE="ntfs"
/dev/sdd2: LABEL="Windows 7 Data" UUID="F4048DFD048DC2DA" TYPE="ntfs"
/dev/sdd3: UUID="b26c549c-41b2-441e-b15e-259bc06d06ed" TYPE="ext4"
/dev/sda1: UUID="58b9ab1d-459a-4c3c-9b1b-e0d17b6c14a7" TYPE="ext4"
/dev/sda2: UUID="313ef1c1-032c-4f17-98b4-6569dc88bd19" TYPE="ext4"
/dev/sda3: UUID="8f664c50-a351-4e7a-af92-dd76823e3a1e" TYPE="ext4"
/dev/sda4: UUID="5a9ae961-c8d8-4924-ba4a-8d92c41fb768" TYPE="ext4"
/dev/sde1: UUID="4d86ba2e-276b-4fca-af2c-426b53766b1d" TYPE="ext4"

Now, let's say the target root is /dev/sda1.

In the /etc/fstab, instead of:

/dev/sda1 / ext4 defaults 1 1

use:

UUID="58b9ab1d-459a-4c3c-9b1b-e0d17b6c14a7" / ext4 defaults 1 1

also, use the same method of the all partitions from this hard drive...

In the /etc/lilo.conf, instead of sequence:

root = /dev/sda1

use:

root = UUID="58b9ab1d-459a-4c3c-9b1b-e0d17b6c14a7"

now, execute "lilo -r /target/partition/mountpoint -b /dev/sda"

where the /dev/sda is the current device or this hard drive.

daweefolk 04-22-2010 06:09 PM

haha you misoverestimated my noobishness. i knew to do it in vi lol i just didnt know about uuids. ill try it tonight and post my results

daweefolk 04-22-2010 06:53 PM

ok I edited my lilo.conf and tried running /sbin/lilo -C /mnt/linuxsys/etc/lilo.conf -b /dev/sdb and it tells me two things.
first, it tells me "Warning: /dev/sdb is not the first disk"
also, it tells me "creat /boot/map~ : File or directory not found"
now what should I do?

LuckyCyborg 04-23-2010 02:20 AM

Please, use this command: lilo -r /mnt/linuxsys -b /dev/sdb

And don't forget to modify also the /etc/fstab to use partition UUID's insted of partition devices.

You can ignore the warnings like "/dev/sdX is not the first disk", of course your usb hard drive is NOT the bood device, now... ;)


All times are GMT -5. The time now is 10:48 PM.