LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-19-2016, 08:52 AM   #1
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Rep: Reputation: 2
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!
 
Old 01-19-2016, 09:31 AM   #2
MarcT
Member
 
Registered: Jan 2009
Location: UK
Distribution: Slackware 14.2
Posts: 125

Rep: Reputation: 51
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!

Last edited by MarcT; 01-19-2016 at 09:32 AM.
 
1 members found this post helpful.
Old 01-19-2016, 10:46 AM   #3
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Original Poster
Rep: Reputation: 2
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.
 
Old 01-19-2016, 11:05 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
add this line append = "root = UUID=<root partition uuid>" to direct the kernel to the correct root filesystem
 
1 members found this post helpful.
Old 01-19-2016, 12:57 PM   #5
dr.s
Member
 
Registered: Feb 2010
Distribution: Slackware64-current
Posts: 338

Rep: Reputation: 156Reputation: 156
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
}
 
1 members found this post helpful.
Old 01-19-2016, 01:52 PM   #6
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Original Poster
Rep: Reputation: 2
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!
 
Old 01-19-2016, 02:04 PM   #7
MarcT
Member
 
Registered: Jan 2009
Location: UK
Distribution: Slackware 14.2
Posts: 125

Rep: Reputation: 51
Try adding rootdelay=10 or even rootdelay=20 to the kernel command line.
 
Old 01-19-2016, 02:50 PM   #8
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 147

Original Poster
Rep: Reputation: 2
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a USB Stick Bootable RHEL5 from iso divyashree Linux - Newbie 6 09-08-2010 12:23 AM
Problem making bootable usb stick for Clonezilla Completely Clueless Linux - General 1 05-06-2010 07:35 AM
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM
Making a bootable usb stick nanderh Linux - Newbie 6 02-02-2009 04:37 AM
Making a usb stick bootable TotalLinuxNoob Linux - Software 2 01-05-2008 11:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration