LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   boot slackware from usb stick (https://www.linuxquestions.org/questions/slackware-14/boot-slackware-from-usb-stick-715231/)

aneroid 03-29-2009 03:42 AM

boot slackware from usb stick
 
I know there are many threads and posts about booting the slackware installer from USB (if the cd/dvd drive can't boot the system, etc.) Strangely, I haven't seen that many about booting a slackware install from an external USB drive or USB stick.

I've installed slackware 12.2 to my USB stick. Before installation/setup (which I did using cds 1-3), I partitioned it this way:
/dev/sdb1 - vfat - 8 GB
/dev/sdb2 - ext2 - 23 GB
/dev/sdb3 - swap - 1 GB (just in case I actually need one)

Installed LILO to the MBR of the USB stick. It starts booting but along the way I get the VFS kernel panic message device (8,18). It says my boot options are /dev/sda or /dev/sda1. But sda is laptop harddisk, not my USB stick...which is sdb and root is on sdb2.

So what do I need get it to work? My guess is, an intird image - but which one and how do I get it into LILO?

(If it's relevant to the solution, I have slax on another USB which I use as a backup linux usb.)

I've tried specifying 'root='s at the 'tab' boot command options but none work (/dev/sdb , /dev/sdb2 , /dev/sdb1).

Yalla-One 03-29-2009 06:08 AM

Did you have a look at the usb-and-pxe-installers directory? The documentation and boot-images there should get you going.

You should also read Alien Bob's excellent howto at http://alien.slackbook.org/dokuwiki/...ckware:usbboot
-y1

linus72 03-29-2009 06:44 AM

There is also the Best one for USB-installer for Slackware 12.2
With this and a 4GB or larger USB you can install Slackware-12.2 Full with all packages!
( http://www.slackware.com/~alien/tools/usbinstall/12.2/ )
Please tell me if you get it working...

linus72 03-29-2009 06:50 AM

Additionally there is the Netinstall 40MB Mini-install .iso which can be extracted to a folder-transferred to USB-then configured to boot from USB-but you must know the Slackware 12.2 mirror urls, etc when installing.
( http://www.slackware.com/~alien/slackboot/mini/12.2/ )

aneroid 03-29-2009 07:06 AM

Quote:

Originally Posted by Yalla-One (Post 3491388)
Did you have a look at the usb-and-pxe-installers directory? The documentation and boot-images there should get you going.

I know I need to create an initrd of sorts. However, I'm not looking to make a "USB installer". I installed slack 12.2 TO a USB and now I get the VFS kernel panic message half-way through the boot.

Quote:

Originally Posted by Yalla-One (Post 3491388)
You should also read Alien Bob's excellent howto at http://alien.slackbook.org/dokuwiki/...ckware:usbboot

I can see where you're going with that... I'll start by using the initrd on the slackware disc to boot into Slack. For lack of a better option.

Then, update packages, recompile and make a new/proper intird.

linus72 03-29-2009 07:12 AM

Can you post the syslinux.cfg you have for the 12.2 USB that is having the kernel panic?
Or the isolinux.cfg-is it booting from the FAT32 partition?

Alien_Hominid 03-29-2009 08:08 AM

You can try http://unetbootin.sourceforge.net/

aneroid 03-29-2009 08:26 AM

Couldn't find 'syslinux.cfg' anywhere in the dir tree. I used the kernel 'huge' from the install cd. My lilo.conf on the USB:

Code:

boot = /dev/sdb

  bitmap = /boot/slack.bmp
  bmp-colors = 255,0,255,0,255,0
  bmp-table = 60,6,1,16
  Timer location x, timer location y, foreground color,
  bmp-timer = 65,27,0,255

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
prompt
timeout = 50

vga = 773

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdb2
  label = Slack122-1
  read-only  # Partitions should be mounted read-only for checking
other = /dev/sda1
  label = WindowS
  table = /dev/sda


linus72 03-29-2009 08:36 AM

It looks similar to my lilo.cfg
A question-do you have slack installed to your USB like it's a HD?
The lilo.cfg is for the USB right?
I have never tried it that way...
Others here would know more about that...
But, you can also try several different methods-netinstall and usb install as I mentioned above-or additionally I think you can have the slack netinstall boot off the FAT32 partition, put the Slackware-12.2 DVD iso on the ext2 partition and then tell slack to find the iso at the menu prompt during setup-I think I saw that somewhere...?

aneroid 03-29-2009 08:41 AM

Quote:

Originally Posted by linus72 (Post 3491494)
It looks similar to my lilo.cfg
A question-do you have slack installed to your USB like it's a HD?
The lilo.cfg is for the USB right?

yes to both.

Quote:

Originally Posted by linus72 (Post 3491494)
But, you can also try several different methods-netinstall and usb install as I mentioned above-or additionally I think you can have the slack netinstall boot off the FAT32 partition, put the Slackware-12.2 DVD iso on the ext2 partition and then tell slack to find the iso at the menu prompt during setup-I think I saw that somewhere...?

but that would help to install from USB, not to USB.

linus72 03-29-2009 08:44 AM

OH! I thought you trying to install from USB-sorry!
I don't understand what's wrong-here is my lilo.cfg from my HD sda1
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
#compact        # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
prompt
timeout = 300
# VESA framebuffer console @ 800x600x256
vga = 771
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0    # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda1
  label = Slackware12.2
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

I would think the USB is not being recognized or not recognized as a HD...
I'm sure somebody here knows...
Also, your booting lilo off the FAT32 partition?
Is that possible?
What is the FAT32 partition for?

mrclisdue 03-29-2009 09:02 AM

One of the members here has pretty detailed instructions on how to accomplish this:

http://linuxconfig.dyndns.org:1184/l...vable_USB_disk

including info for your initrd.

Also, I'm pretty sure you're going to have to add a rootdelay line in your lilo.conf in order to give your system time to properly mount the usb stick.

I know there are some recent threads in this sub-forum regarding this. I was keen a couple of months back, but I'm happy with my extremely-customized slax usbstick at the moment, and I don't feel like scrapping it to make it pure Slackware (perhaps when 12.3 is released I'll give it a go....)

When I have a moment, I'll see if I can hook you up with those threads.

cheers,

aneroid 03-29-2009 09:37 AM

Quote:

Originally Posted by linus72 (Post 3491502)
OH! I thought you trying to install from USB-sorry!
...
Also, your booting lilo off the FAT32 partition?
Is that possible?
What is the FAT32 partition for?

not booting off the FAT32 but it's there coz I wanted windows-readable space on the USB stick and read somewhere that windows wants/needs(?) the FAT* partition to be first to be able to read it.

this is the error (wrote it down):
(after 'md' devices...)
Code:

VFS: Cannot open root device "812" or unknown-block(8,18)
Please append a correct "root=" boot option; here are the available partitions
0800 ... sda driver: sd was detecting the harddrive
  0801 ... sda1
0b00 sr0 driver: sr
Kernel panic...

Get similar errors when I use sda, sda1, sdb, sdb[12], etc.

aneroid 03-29-2009 09:39 AM

Quote:

Originally Posted by mrclisdue (Post 3491522)
One of the members here has pretty detailed instructions on how to accomplish this:

http://linuxconfig.dyndns.org:1184/l...vable_USB_disk

including info for your initrd.

Also, I'm pretty sure you're going to have to add a rootdelay line in your lilo.conf in order to give your system time to properly mount the usb stick.

Yup, that worked! :-)
tried
Code:

Slack122-1 rootdelay=10 root=/dev/sdb2
and
Code:

Slack122-1 rootdelay=10
(without explicitly specifying the root). Both worked.

So will now add an append line to lilo.conf, I think that would be easier/faster than modifying initrd, espcially since I don't have one right now. Will give it a try when I recompile the kernel.

Will first redo lilo and re-try the normal boot. Though I'm curious about how 'slax' does it coz there's no notable delay in the boot process.

Thanks

mrclisdue 03-29-2009 11:24 AM

Quote:

Originally Posted by aneroid (Post 3491554)
...Though I'm curious about how 'slax' does it coz there's no notable delay in the boot process...

I haven't investigated, but there's probably a "sleep" function in the initrd for slax. The same guy who maintains slax is responsible for linux-live.org where he explains how to create a live distro, so there may be info there....


cheers,

aneroid 03-30-2009 02:16 AM

Quote:

Originally Posted by mrclisdue (Post 3491651)
The same guy who maintains slax is responsible for linux-live.org where he explains how to create a live distro, so there may be info there....

Was aware of that. Now that the usb sys is up and running with rootdelay (=5 worked) in lilo, planning to recompile and include stuff mentioned on linux-live. Although, will probably not do squashfs since that's for read-only systems. And I know that slax maintains a 'read-only' section and merges it with a 'changes' section so that it's persistent. And allows for a defaulted(safe?) boot option.

OTOH, doing it how slax does it would be interesting and probably more stable in case the excrement hits the rotary cooling device.

So two options:
  1. Slackware 12.2 running on USB
  2. Slackware 12.2 installed and then modified to Slax-style...after installing the programs I definitely want (firefox, thunderbird, alien, etc.)
  3. an obvious 3rd: Using the regular Slax and building it up with all the extras I want. However, I prefer option 2 for this. More fun :-) Actually, I already chose opt 2 after this thread on the slax forum.
(will continue on a new LQ thread when there's updates)

Although, my immediate To-do is searching for program/module that randomizes write blocks on USB so that the read/write cycle limit isn't hit too early for just some memory blocks and end up with an unusable stick. I'm sure there are a few out there being used with SSD harddrives. Will google.

onebuck 03-30-2009 08:24 AM

Hi,
Quote:

Originally Posted by aneroid (Post 3492209)
<snip>

Although, my immediate To-do is searching for program/module that randomizes write blocks on USB so that the read/write cycle limit isn't hit too early for just some memory blocks and end up with an unusable stick. I'm sure there are a few out there being used with SSD harddrives. Will google.

For the read/write of the flash a randomized would be fine but not necessary for 'SSD'. 'SSD' utilizes a different form of memory. The violative nature of the memory of the 'SSD' is taken care of by a battery backup technique. You don't need to randomize the R/W of a 'SSD' as you would with a flash cell.

aneroid 03-31-2009 10:03 AM

Quote:

Originally Posted by onebuck (Post 3492495)
<...> You don't need to randomize the R/W of a 'SSD' as you would with a flash cell.

found some conflicting information over at wikipedia...
Quote:

SSD Disadvantages: Limited write (erase) cycles: Flash-memory cells will often wear out after 1,000 to 10,000 write cycles for MLC, and up to 100,000 write cycles for SLC, while high endurance cells may have an endurance of 1–5 million write cycles (many log files, file allocation tables, and other commonly used parts of the file system exceed this over the lifetime of a computer). Special file systems or firmware designs can mitigate this problem by spreading writes over the entire device (so-called wear levelling), rather than rewriting files in place.
and for flash...
Quote:

Flash file system: In practice, flash file systems are only used for "Memory Technology Devices" ("MTD"), which are embedded flash memories that do not have a controller. Removable flash memory cards and USB flash drives have built-in controllers to perform wear-levelling and error correction so use of a specific flash file system does not add any benefit.
will look into it further.

onebuck 03-31-2009 11:26 AM

Hi,

If the 'SSD' is based on a Flash then of course you will have the limitations. If the SSD is based on DRAM technology then you will not have the problem. The cost difference is the factor between Flash and DRAM based 'SSD'. If your on the cheap then by all means go with the Flash based SSD but if I was setting up a server or instrumentation then a DRAM based SSD would be my preference for multiple access because of the life cycle of a flash based SSD.

The R/W cycle defines the type you would choose for repeatability or life cycle of the device along with the reserve for the system and the access times. If you are just going to utilize for simple system(s) then a Flash based SSD would be useful as long as randomized writes are used which will add overhead. Also a Pen Drive/stick is not the same as a 'SLC NAND Flash SSD'. The SLC based units will last at least 10 times longer than the MLC based units.

BTW, use the wiki with a lot of research along with better definition(S). Wikis are great if you thoroughly investigate. Some information is not complete, so just because it's on there doesn't make it right.

aneroid 03-31-2009 10:48 PM

Quote:

Originally Posted by onebuck (Post 3493857)
BTW, use the wiki with a lot of research along with better definition(S). Wikis are great if you thoroughly investigate. Some information is not complete, so just because it's on there doesn't make it right.

If you meant wikipedia, I absolutely agree in this case. The info was definitely sketchy :-)


All times are GMT -5. The time now is 04:14 AM.