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

Notices


Reply
  Search this Thread
Old 11-10-2014, 11:10 AM   #1
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Rep: Reputation: Disabled
Another thread on usb boot problems...


Greetings. I have spent a lot of time reading documentation, troubleshooting via google searches, and going slowly through the slackware installation process, and yet I still effed up somehow with installing Slackware to a usb drive. I have even read some other threads on this forum about usb boot problems (this one and this one specifically), but I am still quite lost as to how to fix my problem. I apologize in advance for the length of this post.

The goal: I want to install Slackware completely to a 128 GB usb drive. (The slackware I am installing is the "everything except source code" 64-bit 14.1 version from the torrent linked on the official slackware website. I put the iso file on a DVD and am installing slackware from that DVD.) Technically I have two partitions with free space available directly on my hard drive--one 14 GB and one 7 GB--but I figured, when the slackware install itself is about 7 GB, it would make more sense to use the 128 usb drive instead of the much smaller partitions available on the hard drive. Hence, the main thing that was important to me while installing slackware was making sure all changes during the install process were made to my usb drive (dev/sdb) and not to the main hard drive (dev/sda) so I don't screw up my Windows 7 installation or boot, which I still need to use.

Additional info: I am not running any other linux on this machine (Acer Aspire 5552-5898 laptop with AMD Phenom II X3 N830 CPU.) The laptop I am using has 4 GB RAM and 500 GB hard drive, although I do not want to involve my hard drive in the installation. The 500 GB hard drive is running 64-bit Windows 7 and has the two free space partitions mentioned earlier. I have installed other linuxes such as openSUSE, Slax, and Crunchbang Live Install, but nothing as involved as Slackware; sorry for my lack of experience with this sort of thing.

The problem: When I try to boot from the usb, the boot process gets stuck at a startup screen early on: the key issue is the text "kernel panic - not syncing VFS unable to mount root fs on unknown block". I will readily admit that I'm not sure what that means, but I'm pretty sure it has something to do with the way LILO was installed.

What I did: I went through all the aspects of the install. I successfully partitioned my usb drive into two partitions: a Linux swap partition (5 GB) and a bootable main Linux partition in ext4 journaling format (123 GB). The main issue I encountered is with the LILO setup. I didn't want to choose the simple setup since I figured it wouldn't recognize/use the usb drive and would try to install a boot on the sda drive, so I choose the expert install. I read all the info on the LILO help file included in the install process, and that help file seemed to suggest I would be able to specify the sdb drive specifically instead of the sda drive while setting up LILO. So I went through the guided LILO install, and when the time came to choose installing LILO to the superroot location or installing LILO to MBR, the screen specifically mentioned using the first drive for a MBR LILO boot. Afraid that choosing MBR for LILO installation would corrupt my windows boot on the sda drive, I choose to use the superroot location instead; I choose to install LILO to the regular 123 GB Linux partition with ext4 formatting I created on the usb drive earlier in the installation process. And I think this is causing the kernel panic issue, although I am not sure. Afterwards I continued with the rest of the install more or less without issue. However, as described earlier, the usb drive will not boot all the way into linux.

My questions:
  1. Is there a way to install LILO to MBR, but to make sure that the MBR is definitively on my usb drive and not on the sda drive? Again, the text on the screen where you choose the LILO installation location specifically mentioned the using the first drive (sda) for MBR LILO installation; I do not want to involve the sda drive in any way, shape, or form during my slackware installation.
  2. Perhaps I am supposed to use the superroot location for LILO installation; if so, what did I do wrong? Does the partition I choose need to be formatted in something other than ext4? Should I not choose the same partition for the LILO boot install as the one for the regular Linux install?
  3. A lot of the other threads I read regarding this issue involve directly editing/checking the lilo config file and looking up information related to the usb drive, such as UUID and fstab, etc. This is all fine and dandy, but I assume I would need a Linux already installed on my system to access or use these commands. Is there some sort of way to essentially set up a command line environment within/during the slackware install process so I can type in these commands while in the middle of installing slackware? The only other option is to somehow get to a command line interface when the usb drive (unsuccessfully) tries to boot up.
  4. If possible, I would love to solve this issue without reinstalling slackware to the usb drive; it took 6 hours to get the entire slackware system on the usb drive, and I would like to avoid going through that again unless absolutely necessary. I still have the slackware DVD with the installation process on it, so hopefully I could load the DVD and simply get to the LILO part without having to re-partition the usb drive or reinstall the slackware files and packages.
  5. Maybe installing slackware to a usb drive is just beyond my capabilities right now, given my limited experience with in-depth Linux systems and processes. In that case, should I just install slackware to the 14 GB partition with free space on my hard drive? I figured that wouldn't really be enough room to use and explore slackware in the long-term, but maybe it is better than trying to fuss with all the mess I described above.

Some asides regarding installation:
  • During the slackware installation, I attempted to setup networking. I just put "my-computer" for the hostname, but the next screen asked about a domain name. The documentation I read said to simply not give a domain name, but I could not get past the screen without typing something into the domain name box. Not wanting to screw things up, I simply cancelled out of this screen without entering a domain name and continued to the rest of the installation process. Is there a way to setup networking without providing a domain name, and if not what should I put for the domain name? (I was planning to use the DHCP option for the next screen per the documentation instructions.)
  • Minor, but towards the end of the installation process it asked me to choose a mouse option. I chose the first option (PS/2) as prompted by the screen, but my laptop does not have a physical mouse; I am using a touchpad for pointer control. When I get to that screen, what is the correct option for the mouse configuration if I am using a touchpad on a laptop?

TL;DR: Where and how should I install the LILO boot during slackware installation if I am strictly installing slackware to a usb drive (sdb) and not the main hard drive (sda)? More specifically, should I choose MBR or superroot for the LILO boot location?

Thanks in advance to anyone who actually read through all of this.
 
Old 11-10-2014, 01:16 PM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,813

Rep: Reputation: Disabled
Slack is not the easiest distro to start with, you will certainly learn a lot about Linux whilst using it.
My suggestion is to unplug your Windows drive temporarily whilst you install to your external drive - it will save you from newbie mistakes.
With the Lilo boot loader, basically, it needs to install to the MBR of the boot disk to allow using it to fire up your computer; if you don't, you will probably have troubles.
(Grub is a much easier to use & understand.)
The hostname can be anything you like, such as my.net or mydomain.org, it really doesn't matter unless you are on a network, then your IT guy will tell you what it is.
Your touchpad is seen & configured as a PS/2 mouse.
I think that covers what you want, however, if a genuine 'slacker' comes up with something different, go with what they say.
 
1 members found this post helpful.
Old 11-10-2014, 02:22 PM   #3
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
How do I unplug my hard drive? I can't do it physically, since I am on a laptop (at least, not without taking the laptop apart). But is there a way to do it via settings or something so that the computer (temporarily) cannot recognize the main hard drive? I assume that would have to happen in the BIOS if so.

Thanks for the help, once I figure out how to unplug the hard drive I will try to configure LILO with MBR on the usb drive again.

Edit: this thread was the only things I could find, which suggests to me that it might not be possible to disable my internal hard drive from the laptop BIOS. I will examine my own laptop and see what options are available; hopefully something will work out.

Last edited by dubosec; 11-10-2014 at 02:47 PM.
 
Old 11-10-2014, 05:15 PM   #4
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 14
Posts: 542

Rep: Reputation: 33
You put down a lot of questions on the table, but there are a couple of points that can help you to finish the install of slackware.
Firstable make sure your laptop is not booting by UEFI, otherwise you have to reinstall everything in a different way.
If booting by MBR/legacy/old way or whatever you call it, OK, boot by the installation DVD (that is also a boot disk) and when prompted
Code:
huge.s root=/dev/sdbx rdinit= ro rootdelay=6
Short explanation:
huge.s the kernel you want to boot
root=/dev/sdbx is your root partition, replace x with 1|2|3|...accordingly
rdinit= the space after the colon means there's no RAM image to boot
ro read only
rootdelay=6 is a parameter you give the kernel to instruct it waiting 6 seconds before trying to mount the / partition (it may be a liitle less or a little more, it depends on how long your USB system need to settle). This is probably a key point to boot correctly your system

Now, if everything went fine, hopefully, you should be in your slackware system with your /dev/sdbx mounted as / partition, so correctly.
Login as root, then you go to your /etc/lilo.conf and edit like this (I took out most of the file to make things a bit more clear and left the essential)

Code:
# LILO configuration file
 
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0 rootdelay=6"  ------> again,of course give a little delay to settle your USB system
boot = /dev/sdb   -----> this instructs lilo to install on MBR (/dev/sdb, your USB disk) 
prompt
timeout = 1200
vga = normal

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdbx
  label = Linux
  read-only
# Linux bootable partition config ends
Once finished editing
Code:
# lilo-v -t
and if you get nothing wrong or just a couple of warnings
lilo -v
You cannot install LILO on the superblock of your / partition unless you have a second boot loader (or first, if you like) on MBR, what is commonly called chainloading.
It should work, but, I take no responsibility...
Ciao
 
Old 11-10-2014, 09:25 PM   #5
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
urka58, thanks for the really clear directions! I liked that you explained what each command does; I hate typing in commands without knowing what I'm actually doing.

However, I tried your instructions and I still ran into some hangups. When I tried loading the kernel (huge.s) on the root partition of my usb drive (sdb1), I got the same panic phrase that I get when I try to boot into slackware ("kernel panic - not syncing : VFS unable to mount root fs on unknown block"). I even tried to skip that step and keep going, but then when I tried to get into the lilo configuration file (/etc/lilo.conf), the program simply returned the phrase "no such file or directory."

I might have some good news, though. Someone pointed me to this thread, which suggests I might have to type out the following to get the usb stuff working:

Code:
mkinitrd -c -k 3.10.17-smp -m usb-storage:ehci-pci:ehci-platform -u -w 10 -f ext4 -r /dev/sdb1
(I'm not sure what all that does, but I think it has something to do with getting the kernel to recognize the usb drive so it doesn't panic when booting from it.)

After I found the line of code above, I tried entering it during the install process, but the system only returned "mkinitrd: no such command" or something like that. After that I loaded back into Windows and did some searching, and I think the key may be to mount the usb drive and then change the root directory to that mount (as suggested by this thread):

Code:
mount -t auto /dev/sdb1 /mnt
chroot /mnt
I don't know what "-t auto" means, but everything else there more or less makes sense. After trying this, hopefully I can finally access the lilo config file and manually specify the usb drive for the MBR LILO boot, but I am not sure if this will work after all is said and done.

I will keep you updated on my progress and see how this goes.

Edit: I'm pretty sure my laptop uses BIOS and not UEFI; everything in my settings points to something called SMBIOS.

Last edited by dubosec; 11-10-2014 at 09:29 PM.
 
Old 11-10-2014, 10:02 PM   #6
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,678

Rep: Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838
after chrooting into your system, post the output of
Code:
fdisk -l
and your /etc/fstab file. A bad entry in /etc/fstab will also cause booting problems.
 
Old 11-10-2014, 11:01 PM   #7
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
colorpurple21859, fdisk -l returned exactly what I expected it to return: it shows my regular drive (sda) with the two free partitions, and it shows my usb drive (sdb) with the two partitions, Linux and Linux swap.

I'm not sure what /etc/fstab returns because I am getting permission denied errors. Should I do "su passwd root", setup a password, and then do "su root"? Would this password persist after I successfully boot into slackware? Does slackware even use sudo?

Anyway, I typed in the mkinitrd... commands and while it ran, it also returned "cat: /proc/partitions: no such file or directory". However, it also returned "/boot/initrd.gz created" which I think is good. Before that it also says "19638 blocks" and a bunch of "lib/modules/3.10.17/kernel/drivers/usb/host/ehci-x. ko added." The x ranges from hcd, pci, and platform. There's also a similar entry for ".../drivers/usb/storage/usb-storage.ko added"
 
Old 11-10-2014, 11:32 PM   #8
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
Okay, so I was able to access the files using "sudo cat [filename]". The etc/fstab returns both usb partitions (sdb2 as swap and sdb1 as / with ext4 format). Both are set to default in the options tab. The swap file has 0 for both the dump and pass, and the regular linux file has 1 for both the dump and pass. The proc is also set to default and returns 0 in the dump and pass.

When I returned /etc/lilo.conf, I can't see the top of the file, but the bottom (after the vga/vesa listings) matches exactly what urka58 wrote, so that's good.

Edit: I reinstalled lilo per urka58's instructions above, but upon trying to boot into slackware from the usb drive, it still returned the kernel panic error. However, instead of "kernel panic - not syncing - VFS unable to mount root fs on unknown block (0,0)" is it now returning "kernel panic - not syncing - VFS unable to mount root fs on unknown block (8,17)". So apparently those numbers are involved somehow. I think that the "cat: /proc/partitions - no such file or directory" error may have something to do with it.

Last edited by dubosec; 11-11-2014 at 12:34 AM.
 
Old 11-11-2014, 12:19 PM   #9
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,678

Rep: Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838
From slackware dvd
mount your slackware partition to /mnt
then
Code:
mount --bind /dev /mnt/dev 
mount --bind /dev/pts /mnt/dev/pts 
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
then
Code:
chroot /mnt
now rerun liloconfig and see if anything changes
Slackware doesn't use sudo
 
Old 11-11-2014, 12:28 PM   #10
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,678

Rep: Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838
The /boot/vmlinuz is linked to the /boot/vmlinuz-huge kernel. Mkinitrd is used to create an initrd.gz for the generic kernels.
 
Old 11-11-2014, 12:46 PM   #11
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 14
Posts: 542

Rep: Reputation: 33
Sorry, but I do not understand exactly the point when you get the kernel panic now, booting from the DVD or booting from the USB disk?
If you get it booting from DVD try to increase the delay to 15 secs
Code:
huge.s root=/dev/sdb1 rdinit= ro rootdelay=15
It shouldn't be necessary chrooting, as with the commands above the kernel should be aware of the / partition.
Anyway, when chrooting you should also specify the command interpreter (bash)
Code:
chroot /mnt /bin/bash
Ciao

Last edited by urka58; 11-11-2014 at 12:48 PM.
 
Old 11-11-2014, 12:54 PM   #12
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,678

Rep: Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838
Quote:
Anyway, when chrooting you should also specify the command interpreter (bash)
very true.
Quote:
It shouldn't be necessary chrooting, as with the commands above
Most times not, but sometimes it helps.
 
Old 11-11-2014, 07:09 PM   #13
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
So, just to give an update so far: adding "mount --bind /proc /mnt/proc" does solve the "cat: /proc/partitions - no such file or directory" error, but when I try to boot into slackware from the usb drive, it is still returning the kernel panic error with (8,17) at the end.

Here is what I have been doing, exactly:

First, I let the installation DVD boot up; it asks me about kernel parameters. I have tried to specify the code urka58 suggested at this stage:

Code:
huge.s root=/dev/sdb1 rdinit= ro rootdelay=20
But when I do this I can't even boot into the installation; it returns that same kernel panic error, ending in (0,0). So when the installation DVD asks me about kernel parameters, I simply press enter without giving any parameters.

The DVD then gives me the option to use a non-US keyboard but this does not apply to me, so I continue without changing keyboard layouts.

Then I get to the part where I am able to login as root and enter commands. This is what I have been entering at the beginning:

Code:
mount /dev/sdb1 /mnt
mount --bind /proc /mnt/proc
(I have also used "-o bind" instead of "--bind", as someone else suggested to me.)

I type the following as well, as suggested by colorpurple21859: I have tried it with and without these mounts, in fact.

Code:
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
Then I proceed with:

Code:
chroot /mnt
(I have tried with and without the /bin/bash part; that part doesn't seem to have any affect on the outcome.)

Code:
cd /boot
mkinitrd -c -k 3.10.17 -m usb-storage:ehci-pci:ehci-platform -u -w 20 -f ext4 -r dev/sdb1
I wait for the messages to load, which read "lib/modules/3.10.17/kernel/drivers/usb/host/ehci-x. ko added." The x includes hcd, pci, and platform. I also wait for the initrd.gz to be created, and then I type

Code:
initrd = /boot/initrd.gz
At this point what I do varies. Following one suggestion given to me, I type:

Code:
lilo -C /etc/lilo.conf -i /dev/sdb1
And I wait for the messages to load.

I then press Ctl-Atl-Del which reboots the computer. I then remove the installation DVD from the optical drive to see if the usb boots into slackware. It returns the kernel panic message with (8,17).

Back to the drawing board.

After creating/loading all the usb modules, instead of "lilo -C /etc/lilo.conf -i /dev/sdb1" I try to use the commands urka58 suggested to see if it works:

Code:
lilo -v -t
This gives me two warnings: it warns me that the sdb is not the first drive, and it warns that it's assuming LBA32 addressing or something like that. Afterwards, I type

Code:
lilo -v
And some text pops up saying that it's writing the boot drive. Once this finishes I reboot, remove the installation DVD, and try to boot into slackware. Same kernel panic error with (8,17).

Oftentimes I will look at the lilo configuration file after I have loaded the usb modules from mkinitrd. I should note that, if I just type "/etc/lilo.conf" into the system, it gives me a permission denied error. In order to view any files, I have to add "cat" before the filename. So "cat /etc/lilo.conf" instead of just "/etc/lilo.conf." I then look at the bottom half of the lilo conf file after all the VGA/VESA messages have loaded. It says this:

Code:
image = /boot/vmlinuz
root = /dev/sdb1
label = Linux
read-only
urka58 said I should edit the lilo.conf file so that it reads:

Code:
append=" vt.default_utf8=0 rootdelay=20"
boot = /dev/sdb
prompt
timeout = 1200
vga = normal
However, I think these are above the VGA/VESA messages, so I cannot see them on my screen and I do not know how to get to them. The page-up/down keys, up & down arrow keys, and the scroll lock button all seem to have no effect within the installation environment.

The only thing I can think of at this point is that I am not editing or rerunning the lilo.conf file correctly. Currently, the installation system is not returning any explicit error messages during the entire process, so I am not sure what to target now.

Everyone, thank you for your help and patience with this whole ordeal. I think I'm simply in over my head at this point. I might have to settle for installing slackware to the 14 GB partition on my hard drive or using something like Salix for the moment. But if I can somehow get slackware to boot on this usb drive (especially since it took 6 hours to get on there), that would be ideal.

Last edited by dubosec; 11-11-2014 at 07:13 PM.
 
Old 11-11-2014, 09:29 PM   #14
dubosec
LQ Newbie
 
Registered: Nov 2014
Location: Atlanta, GA (US)
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: Disabled
I figured it out! You know what was wrong? I needed to open the lilo.conf in nano, or some other text editor, and physically edit the file. I had no idea you could access text editors from the install DVD! I typed in "nano /etc/lilo.conf" and suddenly realized what I had been doing wrong earlier. After I added the "initrd = /boot/initrd.gz" early in my lilo.conf file, everything went smoothly.

Since booting slackware from a usb drive seems to be such a common problem (especially for 14.1), I am going to write something up so no one has to go through what I just did. There are a few explanations out there already, but none that are geared toward people who need a lot (and I mean a lot) of detail and are just getting introduced to this level of technically.

I am grateful to everyone who tried to help me on here. In the future I hope to be able to help someone on here the way you guys helped me.
 
Old 11-11-2014, 09:42 PM   #15
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,678

Rep: Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838Reputation: 838
Humor me for a minute, but I have seen this happen before with usb drives, chroot back into the slackware installation, then
Code:
nano /etc/lilo.conf
and change
Code:
root = /dev/sdb1
to
Code:
root = /dev/sda1
rerun lilo and see what happens. I have seen usb drives change drive order during booting and cause mounting problems.
 
  


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
slackware boot from USB problems Imprive Slackware 3 10-05-2010 09:20 AM
SUSE 11 USB boot problems reetaard Linux - Newbie 4 11-21-2008 07:13 AM
USB drive boot problems. lynnevan Fedora 7 11-27-2006 08:52 AM
USB Conflicts and boot problems AngryLlama Linux - Hardware 1 08-24-2006 10:41 PM
Boot Problems - USB Legacy AnthonyJAttard Linux - Hardware 4 11-26-2004 04:17 PM

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

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

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