SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You can certainly install slackware on a usb stick, in fact there are recent threads that go into the details, most recently this one which in turn links back to this one.
In brief, you need to use fdisk or cfdisk to set up partitions before you run setup, and then inside the setup program you just choose which device you want to install to -- this can be a usb stick or an external usb hard drive (the latter is perhaps more sensible since usb sticks are supposed to have limited write cycles and so it is sometimes said that installing a regular linux distribution on one of them can burn it out quite quickly).
If your usb stick/drive shows up as /dev/sdb (while your main drive shows up as /dev/sda, say) then you go e.g. fdisk /dev/sdb and away you go...
It said LILO is very close knit to Slackware system, but did not go into any details. It did mention to manually install LILO and its config file is located:
/etc/lilo.conf
If Slackware does not boot, there is no way to access 'lilo.conf'.
Also, installation did mention 'os/2 boot manager' was an option, that's new to me.
The 'setup' main program of the installer early runs the 'probe' wrapper to fdisk to make a list of all partitions with their types.
Then when you select the TARGET entry it allows you to choose as target any partition of type 'Linux', regardless of the media where it lies.
Oh, and about "os/2 boot manager", you *could* find a machine with OS/2 installed (look for that in the nearest computer museum). But the "liloconfig" program does not allow you to deal with OS/2 partitions any more (the code is still there just in case OS/2 makes a comeback but is commented out).
First, before you run setup, you need to create a linux partition and a swap partition on your usb device (flashstick/external hard drive). You can use fdisk, use `n' to create new partitions and `t' to make sure they are the correct type (when you use `p' in fdisk the linux partition should have Id 83, the swap should have Id 82).
Then run setup. Suppose your usb device comes up as /dev/sdb. Then when it comes to installing lilo you can try to do it within setup but it might be better to skip that step and install it manually after you exit setup but before you reboot. If you choose this path, one way is to edit /etc/lilo.conf so it has something like the following:
near the top of the file it should say
boot=/dev/sdb
(this means lilo gets installed to the MBR of your usb device). Then further down near the bottom it should have something like
Then save and exit, and run the command `lilo' which actually installs it.
Then in theory you should be able to reboot, select the boot menu from the bios and choose the usb device and hopefully the slackware boot screen will appear. If this doesn't work you should also be able to boot into your slackware installation using your original install dvd. At the boot: prompt (assuming the usb device still comes up as /dev/sdb)
use something like
mount root=/dev/sdb1
and you should be able to boot into your new installation from where you can fiddle about with lilo and/or maybe use fdisk to make /dev/sdb1 bootable using the `a' command?
I'm in a bit of a rush, there may be some errors in the above but I hope it helps,
lilo is not included in the installer. It is (to be) run inside the freshly installed Slackware, for instance after chrooting to it before rebooting
This not a privilege problem as all you do during installation (before you reboot) is as root.
Oh, and I don't understand what you meant when you wrote: "the plan is to have the hard drive exempt from setup's installation process." Could you please elaborate a bit on:
(1) the meaning (it may be obvious for you, then sorry to ask but English is not my native language)
(2) the goal (why do you need that?)
Last edited by Didier Spaier; 03-22-2013 at 04:58 PM.
Sorry I forgot one important step: as Didier points out, after you exit setup you need to
chroot /mnt
Then you can cd /etc and open lilo.conf in an editor (the vi editor for instance), make sure it has the lines I mentioned above, save it, then execute the command
lilo
This installs lilo onto the master boot record of your usb device. Then you can (try to) reboot. If this doesn't work you can always use the install dvd to boot into the new installation (as described in my earlier post) and once there you can try to install lilo as detailed above (no chroot necessary then of course).
Oh, and I don't understand what you meant when you wrote: "the plan is to have the hard drive exempt from setup's installation process." Could you please elaborate a bit on:
(1) the meaning (it may be obvious for you, then sorry to ask but English is not my native language)
(2) the goal (why do you need that?)
Hi Didier Spaier,
I will translate:
Its been a year now, since making the Linux leap. The first two Distro's were Mint & Lubuntu, which installed out-of-the-box onto a 8GB USB thumb drive. Also, included was Grub2, that made a dual-boot setup. These Linux OS's functioned without using the Warranteed Windows OS's HD. This is what I mean 'exempt'. Grub2 allowed me to select either Windows or Linux.
I am simply trying to mimic this functionality with my latest Distro, Slackware 14.0
Then you can cd /etc and open lilo.conf in an editor (the vi editor for instance), make sure it has the lines I mentioned above, save it, then execute the command
lilo
Michael
Hi Michael,
From your earlier post, you suggested skipping lilo setup, as I did. This leaves NO config at:
/etc/lilo.conf
At least I couldn't find it.
What does lilo.conf essentially need, besides the 'boot' and 'root' data, that you posted?
If this doesn't work you should also be able to boot into your slackware installation using your original install dvd. At the boot: prompt (assuming the usb device still comes up as /dev/sdb)
use something like
With each new release, the exact way to boot from the install media changes slightly. For instance, on an old slackware 13.1 CD1 I had lying around, the way to use the installation CD to boot the slackware installed on /dev/sdb1 is to enter the following at the boot: prompt
hugesmp.s root=/dev/sdb1 rdinit= ro
(sorry, the word ``mount'' is used in the same way as hugesmp.s is above here, as the label for the image to boot on the slackware usb bootdisk created during setup, my mistake. It will be different on install media, but see below...)
I tried doing this today on an old SD card I had lying around (I've got lots of things lying around). I couldn't install lilo -- I don't know why, but I tried to boot the new installation from the install CD. The first time around it didn't work -- couldn't find /dev/sdb1. But I remembered reading about a kernel option rootdelay= which lets it wait a while before trying to mount the root partition. So instead I used
hugesmp.s root=/dev/sdb1 rdinit= ro rootdelay=30
and as it booted, it stopped with a message like ``waiting 30 sec to mount root'' or something, and after a few seconds, it printed out ``found ... sdb''. So this did the trick.
Now, I know it's still a long way off from perfect, but I believe you should be able to boot into the slackware installation on your external device as follows:
0. Go ahead and install slackware onto your external device (say it is detected as /dev/sdb, for the sake of illustration, and that your root partition is /dev/sdb1). Don't try to install lilo though.
1. Boot the install media.
2. Look at the message, it will say something like ``In a pinch, you can boot your system from here with a command like:
boot: ..... root=/dev/sda1 ......''
(where the contents of the two .... vary slightly from release to release -- I'm not sure what yours will say ).
Now, at the boot: prompt type the same line as in the welcome message *BUT*
(a) change the sda1 to sdb1 (or whatever your root partition is) and
(b) add ``rootdelay=30'' (you can make it less 30 after you have tried it once to see how long it takes for your /dev/sdb1 to be detected) to the end of the line (leaving a space after what is already there), then hit Enter.
If you have installed a system on the given partition, it should detect it and boot into it.
Once this is working you can worry about installing lilo.
I'm sorry this is all a bit rough, but hopefully it will help you.
Michael
Last edited by michaelslack; 03-22-2013 at 09:10 PM.
Reason: Clarify instructions
Slackware 14.0 install DVD calls for the same 'panic' command, along with your rootdelay tip. Root gets mounted, then OS freezes with caps lock LED blinking:
Code:
EXT4-fs (sdb1):mounted filesystem with ordered data mode.Opts:(null)
VFS:Mounted root (ext4filesystem) readonly on device 8:17.
devtmpfs:error mounting -2
Kernel panic-not syncing: No init found. Try passing init= option to kernel.
See Linux Documentation/init.txt for guidance.
What's this Kernel panic about? I need to locate init.txt Linux Doc.
coner
The device name of an SCSI removable device can change. You will have to designate it by its UUID instead. man liklo, man fstab, man blkid, search for "blkid UUID" inthis forum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.