How could I get the Slackware Linux distro on my external HDD booted up from my noteb
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.
How could I get the Slackware Linux distro on my external HDD booted up from my noteb
I'm using a notebook bought in 2006, the configuration is 60GB HDD, 940gml chip, 2GB memory, 1.6GHz Celeron-D CPU. I bought a USB2.0 3.5inch 1TB "Seagate Expansion External Drive". The file system of the only partition on it is NTFS. I installed Grub MBR on the external HDD using grubinst then copy the grldr, grub.exe and menu.lst to it, added Slax to the only partition, then I could get Slax booting up. However, the external HDD could only get booting up when my notebook is first power on; if I reboot it, the external HDD would auto turn off and on when sef-checking and cannot be shown in the Esc boot menu.
I tried to install Slackware 13.1 to the external HDD successfully but failed to boot. I used WinPM to resize the primary partition to make about 60GB space at the end of the disk for Linux distro; booted the Slackware USB image from Grub4DOS, and ran cfdisk to make patitions from the 60GB space for Linux, ran setup to install Slackware. Then at the step of the lilo bootloader configure, if I select to install the lilo in MBR, it would fail to boot, displaying "L..."; if I select to install the lilo in the super block of the "root" partition then boot from grub, it would fail too, because I found that there is no way to mount the Linux partitions of the external HDD in the grub cmd line. When I say "root (hd0,4)", it would halt without any prompt; If I say "root (hd0," then press the Tab key, instead of listing the partitions on hd0, it would halt too. If I set the root partition of the Linux install as the second primary partition and install Slackware distro to it, the grub would show error either saying it cannot recorgnize the ext4 file system(ext4 fs, sda2) or unable to mount selected partition(ext2 fs).
I feel you are falling between 2 stools. The situation is this: Either
1. People boot from an internal hard drive, and then eventually that loads a driver for the usb, or
2. You boot from usb, in which case the bios wakes up the usb in some elementary way, and says "He's booting from usb: There you go." to the usb drive.
What is less possible is a boot from the hd which uses the usb for the kernel, because of the catch-22. You will be specifying sdb (Or something), and sdb isn't visible until you have a kernel that has woken up the usb.
I would try searching the net for guys who have wasted part of their lives trying this and came up with something. Don't bother to read anything that says it is easy; When some guy says: "This was a bitch to do, but I got it" That's the report you want. If you want to have a go, maybe compile in usb in the kernel, and store the kernel internally with a decent sized initrd. Have your /boot partition on sdaX, and your / on sdbX At least that gives you a direction to go in.
I can get Slax boot up under grub from my portable USB HDD ntfs partition specifying the kernel and initrd.
I just press Esc key at boot time and select boot from the portable HDD.
I cannot run "root (hd0,4)" in grub cmd line or it halts.
If I run "root (hd0,1)" it says "cannot mount selected partition".
The version of grub is grub4dos 0.44.
I don't want to resize my internal HDD.
I can get Slax boot up under grub from my portable USB HDD ntfs partition specifying the kernel and initrd.
I just press Esc key at boot time and select boot from the portable HDD.
I cannot run "root (hd0,4)" in grub cmd line or it halts.
If I run "root (hd0,1)" it says "cannot mount selected partition".
The version of grub is grub4dos 0.44.
I don't want to resize my internal HDD.
Greetz
I think you are trying to compare apples to oranges here. Slax is still primarily a LiveCD distro. It can indeed be easily installed to hard drive with the built in "liloinst.sh" but "/" (root) is still unpacked on the fly to a ramdrive NOT on any hard drive partition. Support for ramdrives come very early in the kernel process and importantly here, long before hdds are assigned a device name. Therefore Slax is very comfortable on an ext drive. It seems to me you may have to build an initrd that will effect a proper handoff, loading things you need before they are needed instead of after, if you want the persistent root partition to be found and loaded properly as in a normal full Slackware install.
Hope this helps
Greetz
I think you are trying to compare apples to oranges here. Slax is still primarily a LiveCD distro. It can indeed be easily installed to hard drive with the built in "liloinst.sh" but "/" (root) is still unpacked on the fly to a ramdrive NOT on any hard drive partition. Support for ramdrives come very early in the kernel process and importantly here, long before hdds are assigned a device name. Therefore Slax is very comfortable on an ext drive. It seems to me you may have to build an initrd that will effect a proper handoff, loading things you need before they are needed instead of after, if you want the persistent root partition to be found and loaded properly as in a normal full Slackware install.
Hope this helps
the content of menu.lst should be
title ...
root ...
kernel ...
initrd ...
"kernel /vmlinuz-huge-smp-2.6.33.4-smp root=/dev/sda4" fails, displaying "invalid or unsupport excutable binary format". And somebody says that it doesn't need a initrd file while using the huge smp kernel of Slackware 13.1.
I installed Slackware to the logical partition of portable HDD and grub4dos doesn't help to bootup. Should I use other bootloaders? I read that there may be some limitations on USB portable HDD or BIOS or grub. My portable HDD is 1TB, the primary partition is 900 GB ntfs. Maybe I can only set the boot partition at the beginning of the disk.
Greetz
Personally I hate initrd and always build kernels so they don't need it. I no longer have "huge-smp" on my box so I can't easily check to be certain but I don't think even "huge-smp" loads USB or eSATA support early enough to boot successfully with Grub from external hard drives. I am playing with trying to get Slax's lilo (and the way Slax saves changes) to allow a persistent "/" partition but it is not a high priority since it runs fine, as is, on my ancient laptop with sufficient ram. I would have left it on USB stick for newer boxen if so many didn't die so easily with constant rewriting.
Anyway, the issue seems to be having to declare a root location that cannot be found until too late in the kernel process.
This is why I've heard talk of using the rootdelay parameter to the kernel. Searching the forums for rootdelay may give you a few pointers about USB booting as well.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
I used to boot to an external USB hard drive by installing lilo to the external drive's MBR. I then had to tell the PC's BIOS to boot from an external USB device, (which is setting on my machine), and I had to add this line to lilo.conf (I boot using lilo).
Code:
append="rootdelay=30"
this was necessary to make the kernel load wait sufficient time for the usb drive to be recognized. This worked fine with the huge kernel but when I built the generic, (which is recommended), I had to add the drivers to my initrd for the file system, (ext3), and also the usb storage drivers ehci-hcd and usb-storage on this machine. I also added "-w 30" to the mkinitrd command to be sure the loading delayed. This all worked fine and I then went on to load lilo to an internal drive which I booted the external drive from. Using the same techniques ,(and also mounting the external drive first before running lilo), made this work fine too. As you use grub I think the mount first step is not needed.
So, in a nutshell, I think you should first look at adding a rootdelay= option to the kernel boot up line (i.e. a grub option) then maybe installing a boot loader to the MBR of the external drive if your machine may boot from an externally attached USB device. In any case you should be OK using a bootloader on the internal drive and booting to the external USB drive.
One oddment I found when using a friends laptop which had the ability to boot from an external USB drive is my existing USB drive wouldn't boot when attached. It was not an option to install another boot loader to his internal hard drive so I had to boot using a specially made DVD and adding the "root=" kernel parameter. Very much like the option the Slackware install DVD gives you to boot to an existing Slackware installation.
You should be able to get this working - if you need more information on the methods I mention googling around will give lots of help.
Edit: Apologies for perhaps repeating the tip given by T3slider - I was typing this in and checking it as he posted.
Last edited by bgeddy; 01-04-2011 at 01:02 AM.
Reason: Additional information
To speak from my own experience, I usually use an external e-SATA HDD Case, Scythe Kamazo 2 e-SATA, which is fitted a 2.5” SATA Seagate Momentus hard drive, which has 80G.
How is it partitioned?
Code:
bash-4.1# parted -s /dev/sde print
Model: Generic External (scsi)
Disk /dev/sde: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 1999MB 1999MB primary linux-swap(v1)
2 1999MB 20.0GB 18.0GB primary ext4 boot
3 20.0GB 80.0GB 60.0GB primary ext4
So, partition 1 is a 2G swap, partition 2 have 18G and here is installed the Slackware-current system, and partition 3 have 60G and is used for data. Of course, the main function is to be used for data transport.
How it works?
I use the standard generic kernel, with initrd. The mount points is determined using UUID's. In this way, the kernel always finds the correct Linux partitions.
For that I must use a complicated command to generate the initrd, I use a small script, /boot/mkinitrd-2.6.35.7-smp.sh:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
lba32 # Allow booting past 1024th cylinder with a recent BIOS
# Append any additional kernel parameters:
append="console=tty1 vt.default_utf8=1 video=1024x768-24@60.0"
boot = /dev/sdb
map = /boot/boot.map
# 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
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 100
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
# vga = 5
# 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
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.35.7-smp
root = "UUID=88b404f5-9cc0-4235-a876-818bddcb9a35"
label = Linux-generic
initrd = /boot/initrd-2.6.35.7-smp.gz
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = "UUID=88b404f5-9cc0-4235-a876-818bddcb9a35"
label = Linux-hugesmp
initrd = /boot/initrd-2.6.35.7-smp.gz
read-only
# Linux bootable partition config ends
An interesting note about LILO, is that when you update it, you must use your real boot device, then: lilo -b /dev/sde, for example.
Otherwise, I have a typical installation of Slackware, with all the bells, including KDE4.
However, I do not recommend using a custom /etc/X11/xorg.conf, because X.org should work on different systems. In most cases, it manage to self-configure.
One last question, how we find the partition's UUID?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.