LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware on USB (https://www.linuxquestions.org/questions/slackware-14/slackware-on-usb-736656/)

igadoter 06-30-2009 06:25 AM

Slackware on USB
 
Hi,

I want to install Slackware on USB stick (pen-drive). It seems to be
easy. What's the problem is how to boot it. Should I install lilo somewhere on the pen-drive? Or the system is booted via isolinux as
on CD\DVD?

janhe 06-30-2009 06:33 AM

AFAIK, you can put lilo on the USB stick. Just remember to put the name of the USB stick in the "boot =" line of /etc/lilo.conf . e.g.
Code:

boot = /dev/sdb
Do NOT put a number after it, like in /dev/sdb1

XGizzmo 06-30-2009 07:21 AM

You will also have to added something like rootdelay=10 to your lilo append line.
If you don't you will get errors about it can't mount the root file system.

igadoter 06-30-2009 07:50 AM

Quote:

Originally Posted by janhe (Post 3591326)
AFAIK, you can put lilo on the USB stick. Just remember to put the name of the USB stick in the "boot =" line of /etc/lilo.conf . e.g.
Code:

boot = /dev/sdb
Do NOT put a number after it, like in /dev/sdb1

Why /dev/sdb ? I have four usb ports. Say /dev/sdc , sdb etc.

janhe 06-30-2009 10:35 AM

/dev/sdb is just an example
It could just as well be /dev/sda or /dev/sdc or /dev/sdh or something else (note the "e.g." right before the code in my post)

/dev/sd? (with a letter in place of the question mark) points to a hard drive. This could be the SATA hard drive in your computer (older ATA hard drives are named /dev/hda, /dev/hdb and so forth)

USB drives are treated as regular SATA hard drives, only they connect through USB. The name is given to the USB stick, not to the USB port it connects on.

There is a link about installing slackware 12.1 to a USB stick (http://linuxconfig.dyndns.org:1184/l...vable_USB_disk) in the Slackware (R) links (http://wiki.linuxquestions.org/wiki/...21.27.27.27.22).

If you want more information about the Slackware (R) links, please contact onebuck.

zrdc28 06-30-2009 10:29 PM

unetbootin
 
unetbootin will do exactly what you want, It will download the iso, copy it from cd or from the computer. Just change cmos to boot from usb and you are ready to go.It will run live from usb or install.

Nille_kungen 07-01-2009 01:27 AM

Quote:

Originally Posted by zrdc28 (Post 3592395)
unetbootin will do exactly what you want, It will download the iso, copy it from cd or from the computer. Just change cmos to boot from usb and you are ready to go.It will run live from usb or install.

Well unetbootin doesn't make a persistence liveCD?
Or does it?

Skaperen 07-01-2009 01:58 AM

The unetbootin program can make a bootable flash drive from an ISO, if the flash drive is already formated with the FAT filesystem (as most USB memory sticks are). But then you just have the same system as if you were booting from the ISO. That could be what a lot of people want so they don't have to use an optical disk. It's good for netbooks that don't have an optical drive. This would be the device to boot to do an install to somewhere else.

You can install Slackware (or other distributions) to a flash drive just like any other hard drive. It looks like a hard drive attached via the USB bus, so it should work anywhere USB can be activated. As mentioned earlier, do use the root delay because the kernel doesn't see all devices on USB busses immediately. You would just choose the USB drive like any other drive. But you probably should repartition it, and definitely reformat it. Choose the boot loader in exactly the same way you would with any other device.

Sometimes USB devices show up at different device addresses. So you should make sure /etc/fstab filesystems by label or UUID instead of device name.

I have 2 16GB USB memory sticks, one with slackware-current and the other with slackware64-current, installed. I created these by doing the installation inside a qemu virtual machine targeting an emulated drive that was a file created exactly the same size as the USB memory sticks. After the installation was done, I make a compressed archive of those 16GB images (size went down to about 2GB). Then I just copied the image uncompressed to the USB memory stick devices directly.

vharishankar 07-01-2009 07:19 AM

It's all very well to install of a USB stick or a USB hard drive, but does your BIOS recognize the device when you boot up? If it does, you can load the bootloader on the Stick itself. The installer usually loads the kernel and device drivers for storage devices including USB, so the installer has no problem detecting the device.

On the other hand, if the BIOS does not detect the device, you'll have a hell of a time booting it, because unless a kernel is loaded with the USB hardware module drivers, even LILO or GRUB cannot help you boot the device when you boot the system. I don't know how others got it to work with LILO (maybe LILO loads the Linux kernel modules when it runs, but I doubt it) but it definitely doesn't work with GRUB for me. The device simply is non-existent for me. Even though the BIOS claims to be able to "boot off an external USB drive" it just doesn't work at all.

That is the biggest problem.

Because if any of you have actually got it to work by using the regular boot-loader off the hard disk, I'd like to know what you did to get it to work. Right now, I cannot boot off an external hard disk or USB stick because the BIOS simply ignores the device at boot time and without a kernel already loaded with appropriate USB device drivers, the boot manager cannot help boot off the device either.

igadoter 07-04-2009 09:09 AM

Hi for all of you,

I read carefully your opinions. Tried several options
according your suggestions.

At this moment I succed only in one
thing: I installed LILO on USB and LILO boots the kernel
installed on the same USB.

However the kernel is unable to mount the root partition.
It panics:

Kernel panic: .....

linus72 07-04-2009 09:14 AM

Just to clarify igadoter; are you trying to run a full-hd install From a USB
meaning the filesystem complete is in USB
Or just trying to run slack install cd live?

onebuck 07-04-2009 12:44 PM

Hi,
Quote:

Originally Posted by igadoter (Post 3596494)
Hi for all of you,

I read carefully your opinions. Tried several options
according your suggestions.

At this moment I succed only in one
thing: I installed LILO on USB and LILO boots the kernel
installed on the same USB.

However the kernel is unable to mount the root partition.
It panics:

Kernel panic: .....

You may need to create a 'initrd' for your kernel. Read the '/boot/README.initrd' to understand;

Quote:

excerpt from '/boot/README.initrd';

2. Why do I need an initrd?

The usual reason to use an initrd is because you need to load kernel
modules before mounting the root partition. Usually these modules are
required to support the filesystem used by the root partition (ext3,
reiserfs, xfs), or perhaps the controller that the hard drive is attached
to (SCSI, RAID, etc). Essentially, there are so many different options
available in modern Linux kernels that it isn't practical to try to ship
many different kernels to try to cover everyone's needs. It's a lot more
flexible to ship a generic kernel and a set of kernel modules for it.

3. How do I build the initrd?

See the rest of the file to understand how to create the 'initrd'.

igadoter 07-05-2009 01:37 AM

Quote:

Originally Posted by linus72 (Post 3596500)
Just to clarify igadoter; are you trying to run a full-hd install From a USB
meaning the filesystem complete is in USB
Or just trying to run slack install cd live?

What am I trying to do is a portable and extentible OS, in the sense that
I will be able to add additional applications, say compile sources
from SlackBuild.org. Complete and a fully functional system on USB.
Just plug and play.

So, a distro liveCD is of no use. Most of them are rahter weakly equipped and as I suppose one cannot add other applications. But,
perhaps I am wrong in this.

So, at now I hope to make a full-hd install on USB.

igadoter 07-05-2009 01:45 AM

Quote:

Originally Posted by onebuck (Post 3596686)
Hi,


You may need to create a 'initrd' for your kernel. Read the '/boot/README.initrd' to understand;



See the rest of the file to understand how to create the 'initrd'.

I partitioned USB with ext2 file system. The kernel installed on
USB is full-featured hugesmp.s.

So I have no idea which additional kernel modules should be loaded.

onebuck 07-05-2009 08:13 AM

Hi,

The 'initrd' would load the required modules for the filesystem or any support modules for the specified modules.


All times are GMT -5. The time now is 11:00 AM.