LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problems with making a lilo configured bootable Slackware usb stick (https://www.linuxquestions.org/questions/slackware-14/problems-with-making-a-lilo-configured-bootable-slackware-usb-stick-4175564364/)

mitusf 01-19-2016 08:52 AM

Problems with making a lilo configured bootable Slackware usb stick
 
Hi,

I recently considered finding a way to install new Slackware-current (14.2 beta1) on a usb stick as on my laptop there are problems with the sound with the new current switch to pulseaudio - I do not know yet how to fix it and I hope it will be fixed in the future...

So, I followed the instructions that I found on several sources on Internet for setting up the usb stick after Slackware install, with lilo afterwards, also I also tried first syslinux, with relatively similar results, meaning all I got was either fail to mount the /dev/sdb1 ext4 root partition on /mnt error and dropping me to a prompt, or sometimes (strange because it down't seem to replicate again) kernel panic - not syncing - VFS unable to mount root fs on unknown block (8,17). What is to be mentioned is that in the first case, if I ls /dev on that prompt, I can see /dev/sda partitions (1,2,3,4) but not the /dev/sdb, /dev/sdb1 and /dev/sdb2 devices, also they are certainly present into the initrd-tree.

Here are the steps that I followed, please help me in this direction:

Code:

# mount /dev/sdb1 /mnt/memory
# mount --bind /dev /mnt/memory/dev
# mount --bind /dev/pts /mnt/memory/dev/pts
# mount --bind /sys /mnt/memory/sys
# mount --bind /proc /mnt/memory/proc

The contents of the lilo.conf are the following:
Code:

boot = /dev/sdb
image = /boot/vmlinuz
        append="vt.default_utf8=0"
        label = "Linux"
        root = /dev/sdb1
        read-only
        initrd = /boot/initrd.gz

I then chroot into the partition mount point and generate initrd with (I included as many kernel modules as I knew) - I am trying here on a 14.1 install:
Code:

# chroot /mnt/memory
# mkinitrd -c -k 3.10.17 -m wusbcore:usbcore:wusb-wa:kmod-usb-ehci:kmod-usb-ohci:ext4:usb-storage:ehci-pci:ehci-platform -u -w 10 -f ext4 -r /dev/sdb1

Then I install lilo:
Code:

# lilo -v -C /etc/lilo.conf
And when I boot from the usb stick I encounter the explained errors.


Please help me with this.

Thanks!

MarcT 01-19-2016 09:31 AM

You might be better off trying the Eric's "Slackware Live" bootable image:
http://alien.slackbook.org/blog/beta...-is-available/

However, if you do want to proceed:
IIRC there are some comments on his blog regarding USB delay, which may be relevant to your problem above. You'd also be advised to use UUIDs (eg /dev/disk/by-uuid/whatever) in your LILO config, rather than explicitly stating /dev/sdb, as devices could be detected in any order and it allows for additions drives to be added without breakage.

Good luck!

mitusf 01-19-2016 10:46 AM

Hi MarcT and thanks for the answer. I'll try, of course, Eric's image, in fact that was what inspired me to try building one.

Now, if I try to set lilo with uuid, I manage to see again that VFS error, if I set the 'boot' field to the uuid corresponding of /dev/sdb1 (root sector), and lilo refuses to install if I set it to 'id' ones. I know that it was mentioned in the lilo.conf-example that with newer kernels it should work with setting it to 'id'. So, my next try would be to install the Slackware-current newer 4.4.0 (if I'm not wrong) kernels and test it with it.

colorpurple21859 01-19-2016 11:05 AM

add this line append = "root = UUID=<root partition uuid>" to direct the kernel to the correct root filesystem

dr.s 01-19-2016 12:57 PM

Did this recently using Grub2 instead of lilo, and disk/by-label instead of uuid for the root parameter. Install Slackware as usual by booting
with the install media then attach the USB, format it and label it (I used ext2, Slak1 for label).
After installation, edit fstab to mount / using the label above:
Code:

LABEL=Slak1  /  ext2  defaults  1  1
Then install Grub2 to the mounted device:
Code:

grub-install --boot-directory=/pathToMountedUsb/boot /dev/sdb
Add grub.cfg with the entry below, and mkinitrd as usual (didn't need the -r option with this setup)
Code:

menuentry "SlackUSB" {
 linux /boot/vmlinuz-generic root=/dev/disk/by-label/Slak1 rootdelay=5
 initrd /boot/initrd.gz
}


mitusf 01-19-2016 01:52 PM

I'll try this method right after another try with lilo and without -u flag to mkinitrd. I've already tested the 4.4.0 kernels without success. Actually I didn't ever used grub on Slackware, only on Debian without much understanding of it's power, but it's nice to learn it on Slackware. Thanks.

BTW, also thanks to colorpurple21859, I used his indication but also without any result. It just doesn't see the /dev/sdb1 device, that's why I thought about removing the -u flag, maybe somehow udev removes it. I really don't understand why and how there are moments when I get that VFS - 8,17 error, telling me that at that moment it has seen the device, but couldn't verify it.

Thanks!

MarcT 01-19-2016 02:04 PM

Try adding rootdelay=10 or even rootdelay=20 to the kernel command line.

mitusf 01-19-2016 02:50 PM

I've tried, doesn't work. I am giving up with lilo. With two consecutive similar installs I've got two different results: install was with 'boot = /dev/sdb1' (changed from /dev/sdb) and got the kernel prompt with "could not find /mnt in fstab" (so not a missing /dev/sdb1 this time) and after a second similar lilo install got the frequently "could not mount /dev/sdb1 on /mnt" (mising /dev/sdb1).

I really don't understand what's the cause of this differences.


All times are GMT -5. The time now is 03:52 PM.