LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Possible: Install Slackware 11.0 onto a flash drive as a portable OS? (http://www.linuxquestions.org/questions/slackware-14/possible-install-slackware-11-0-onto-a-flash-drive-as-a-portable-os-621710/)

skelter42 02-16-2008 10:12 PM

Possible: Install Slackware 11.0 onto a flash drive as a portable OS?
 
Hi folks,

I'm a student going through exposure to the open source world, and am having a ton of fun with it. For the last semester I've been using slax server edition for school, as it has almost everything a compsci student needs. Now one of my classes is delving into administration, using Slackware 11.0 as the platform.

To make this short, I have an 8 GB flash drive (lucky me!) and I want to install Slackware on it so I have a full, customizable, OS with me wherever I go.

Is this possible? I did a google and a forum search, but it seems everything pushes towards using a small live distro such as slax or dsl.

Thanks in advance if anyone can shove me in the right direction!

skelter

PatrickNew 02-16-2008 11:30 PM

I believe that ZipSlack is exactly what you're looking for.

Quote:

ZipSlack is a special edition of Slackware Linux that can be installed onto any FAT (or FAT32) filesystem with about 100 MB of free space. It uses the UMSDOS filesystem and contains most of the programs you will need. This means that you do not need to repartition your hard disk if you already have DOS or Windows installed. ZipSlack installs into a directory on your DOS filesystem. It can also be installed to and booted from a Zip disk.

This distribution is ideal for people who don't have a lot of hard disk space, do not have a fast Internet connection to download the entire distribution, or who want a Linux distribution they can carry around on a Zip disk.
from http://www.slackware.com/zipslack/

I don't think it's irrational to assume that you can swap out the word "zip drive" for "flash drive". In the worst case you would just need to update the kernel on the drive to one with usb support if the original is lacking.

budword 02-16-2008 11:35 PM

You don't want to use a regualar distro on a flash drive, as each sector on a flash drive can only support a limited number of writes, about 100K, before that sector dies. 100K seems like quite a few, but it really isn't. The specialized live distro's are built to handle this exact problem. If you won't keep anything important on there, and don't mind wasting that flash drive, well then go ahead, it'll be fun to see how long it lasts anyway. But if you aren't keeping anything worthwhile on there, what would be the point exactly ?

Good luck with that...

David

skelter42 02-17-2008 08:22 AM

@ PatrickNew: thanks for the lead! I have confidence in the zip-type build as I have seen that work on flash drives before.

@budword: thanks for the warning; I knew that the lifetime of flash mem was limited by the writes, but not to what extent. If I go ahead with this, I'll do a minimal install on a smaller drive. I wouldn't want to ruin a large flash drive on an experiment. (At least not one that I paid for!)

Cheers

onebuck 02-17-2008 10:18 AM

Hi,

Quote:

Originally Posted by budword (Post 3059939)
You don't want to use a regualar distro on a flash drive, as each sector on a flash drive can only support a limited number of writes, about 100K, before that sector dies. 100K seems like quite a few, but it really isn't. The specialized live distro's are built to handle this exact problem. If you won't keep anything important on there, and don't mind wasting that flash drive, well then go ahead, it'll be fun to see how long it lasts anyway. But if you aren't keeping anything worthwhile on there, what would be the point exactly ?

Good luck with that...

David

There is a difference between a flash drive (solid state drive/SSD) and flash memory (CF). The new flash drives have a large write cycle life and faster read/write than a flash memory.

I think the number you presented for the flash memory writes is to low. Depends on if the flash memory handles the writes in a zone mode or direct write. Some flash memory have over 3 million writes or even better. This will depend on several conditions. Those being average number of writes, write scheme and filesystem selection to just name a few. I would suggest that you google 'flash drive' and 'flash memory'.

skelter42 02-17-2008 10:21 AM

Well I've been playing around with this, and need some more help. I'm trying to be verbose about what I've done so that any kind gurus will know exactly what I am messing up.

I decided to try a straightforward approach to this (outside of the slackzip method), deciding that as opposed to making the USB bootable per se, I would be willing to use a cd/fd boot disk and load the OS off of the usb.

1. Using fdisk I partitioned a 2GB flash drive as 1 large partition, active, 83 and then formatted it in ext2 (I didn't want to use a journaling FS to reduce the number of writes to the drive).

2. Using a Slackware 11.0 setup disk I installed the A, AP, and N packages onto the flash drive.

3. Then I used the setup disk as a boot disk, and passed the boot parameter: sata.i root=/dev/sda1 noinitrd ro (just like the cheatcode hint text, but for the appropriate "scsi" drive). Keep in mind I am very new to linux; but as I understand it this means: use the default kernel which is located on device sda1, don't load into ram, and load as read only. This is the kernel I defaulted to during the install process.

4. The kernel panicked (that phrase always makes me want to make bad jokes); reading through the dmesg, I'm guessing that this might be due to USB support not being enabled prior to the boot trying to load the OS. It didn't find sda1, since sda1 isn't really a scsi drive, but my usb flash drive.

Edit: the error was something like "VFS Unable to load fs something something 08:01" I took this to mean, hey bub, there is no kernel where you said it would be.

The solution, if my diagnoses of the problem is correct, would be to enable usb support prior to the kernel loading. I went sniffing for a method to do this and did find some helpful parameter sites. There were references to the [knl] usb option and the rootwait option. I tried to use these, but failed.

Questions:

1. Is my assessment of the problem correct?

2. If so, how can I resolve the problem?

3. If the solution involves the parameters, what is the correct syntax for employing them?

Thanks again,

skelter

zux 02-17-2008 12:24 PM

i think the error means that either the filesystem or the device is no recognized.
try the huge.s kernel or compile your own with the needed drivers (those drivers are built as modules in the sata.i kernel)

the root=/dev/sda1 option means that /dev/sda1 will be mounted as /

onebuck 02-17-2008 12:41 PM

Hi,

I would suggest you look at Alien_Bob's 'SlackwareŽ 12.0 USB_Install' as to how he did it with Slackware 12. This will give some insight and methods to possibly use with 11. Sure the easy way would be just use the Slackware 12 USB_Install.

gnashley 02-17-2008 02:03 PM

The kernel panik happens because the usb drivers have not finished initializing by the the time the kernel tries to mount the indicated root partition. You need to pass rootdelay=seconds (with seconds being usually at least 3 and maybe more depending on the number of partitions on the drive. Make sure the sub modules are builtin to the kernel or use an initrd that loads them as modules for you.
There is/was a project called runt linux which is a modified zipslack installation for usb drives, using the umsdos file system which makes it very easy. But you can not use this with kernel-2.6.x at all.

As far as the durability of the drive, don't expect it to last more than a few months. You can increase the life of it by mounting all partitions with the noatime option(this means you have to use a filesystem format which supports it) and by disabling all swapping.

If you are serious about doing this and having it last and be useful, you should dave your bucks and buy a real usb hard drive. Your system will still be slow compared to running from an internal hard drive, but at least it will last for much longer. (Applications take a long time to start over USB because the bus speeds are very low compared to IDE, but once a program starts you won't notice too much difference.

skelter42 02-17-2008 03:09 PM

@gnashley:

Thanks for the advice; I'll try to get it to work the way you suggested. I am serious about very little, including this project. But once I get on something, I like to take it through. I probably will not end up using this method as I had planned, but instead use a USB HD as you suggested. However, at this point I've put enough time in I want to make it work at least once!

Thanks again for everyone's help.

skelter

techyranger 02-19-2008 07:26 PM

It's cool if you can get straight Slackware 11 to boot and run from a USB flash, but a distribution called Wolvix can save you the time. It's a bootable live CD built from Slackware 11 and uses a 2.6.x kernel. Once you burn it to CD and boot, go to it's control panel and their's a utility to install Wolvix to a USB drive.

http://wolvix.org/


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