LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cannot boot slackware13, even with the slackware13 created flashdrive (https://www.linuxquestions.org/questions/slackware-14/cannot-boot-slackware13-even-with-the-slackware13-created-flashdrive-772192/)

yanfaun 11-28-2009 06:55 PM

Cannot boot slackware13, even with the slackware13 created flashdrive
 
Greetings, all!
My two problems with "slackware 13,"*
stated as simply as possible, are as follows: After the succesful install of slackware13 to my external usb drive (/dev/sdb), I could not: 1) boot said Slackware13 installation with the Slackware13 installation DVD due to kernel panic issues. 2) I cannot boot the system with the usb flashdrive that was created with the Slackware13 installation DVD due to kernel panic issues.
>
Problem origin:
I wanted more of a challenge than the more popular distros, so I installed slackware13 as described in the next few sentences.
I connected a spare external USB drive to my computer, which became /dev/sdb. I partitioned sdb and then installed slackware13 onto it. My reading of slackware13 indicated that I would have to boot into slackware13 first, run the grub config program which would create a /boot/grub/menu.lst. This was and is my plan, but alas, since I cannot boot slackware13, (not even with the flashdrive created by slackware13) I am at a standstill with slackware13.

The goal
Use grub to boot slackware from a connected external USB drive (/dev/sdb). Append grub's menu.lst from /dev/sda to the menu.lst of /dev/sdb, followed by the setup of grub on sdb. Since grub is already installed on /dev/sda, all systems on either /dev/sda or /dev/sdb (the external USB drive is sdb) would then boot sans any problems. This works with everything be it Ubuntu, Suse or Tinycore.

Troubleshooting completed thus far:
--skimmed more than 10 pages of this forum and read several
>
--visited Google
>
--set the flashdrive syslinux config from root=dev/sdb5 to /dev/sdc5, which failed

--set the flashdrive syslinux config from root=/dev/sdb5 to root=UUID=12e44-... which failed
Visited the syslinux wiki, which failed also.
>
--attempted to chainload syslinux after copying it to a bootable partition.
>
--Attempted to make a LILO boot floppy
>
--Attempted a simple install of LILO from the DVD, no luck with the world's most difficult bootloader.
>
Attempted to install LILO to the root of the boot partion, which failed.
>
Wiped the disk, sdb, and then created a multiple partition scheme where sdb1 (a bootable primary partition) was made root. Attempted to install LILO to the the root of sdb1 as per the installer's directions. This failed too.

Other questions:
Does slackware give one the option of where to install lilo if I had to use it?
Would the installation of Lilo on /dev/sdb adversely affect the grub install on /dev/sda?
If absolutely necessary, is it common or possible to successfully chainload lilo using grub?
can I chainload grub with lilo?
Thanks for any help

colorpurple21859 11-29-2009 09:02 AM

Some versions of grub will not boot a slackware formatted partition. How did you format the drive? If you formatted it during the install of slackware 13, try installing lilo to the root partition of slackware during the installation and chainload from grub, or try formatting from the distro that you grub is in first, then select no to format the drive during the slackware install, since it is already formated, and boot directly from grub.

Chuck56 11-29-2009 09:55 AM

To add to what colorpurple wrote, Slackware 13 defaults to ext4 when setting up the disk. From what I read, you need grub2 to support ext4. Sounds like you might have grub/ext4 issue.

yanfaun 11-29-2009 12:14 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773259)
Some versions of grub will not boot a slackware formatted partition. How did you format the drive?...or try formatting from the distro that you grub is in first, then select no to format the drive during the slackware install,


Thanks for the reply!

I formatted everything with a different distro's gparted. I've boot ext4 with legacy grub on other distros. I formatted everything as you suggested before posting because it was easier than using cfdisk, which I use as a last resort.

Quote:

Originally Posted by colorpurple21859 (Post 3773259)
...try installing lilo to the root partition of slackware during the installation and chainload from grub,

I'd need help installing LILO. It is way alien to me and unintelligible to me even after I read the readme stuff found in the DVD's root file. It fails to install to root, floppy and I will not put LILO on a MBR.

I think I need to learn the grub config & build initrd stuff first because at least that is on my level if I could find it though. Any ideals?
thanks again.

yanfaun 11-29-2009 12:23 PM

Quote:

Originally Posted by Chuck56 (Post 3773313)
To add to what colorpurple wrote, Slackware 13 defaults to ext4 when setting up the disk. From what I read, you need grub2 to support ext4. Sounds like you might have grub/ext4 issue.

Thanks for responding
Oh I wish it were a grub issue then it would be intelligible to me, which is not to say I am a grub expert. Legacy grub has never given me ext4 trouble. Legacy grub boots everything.

My intended course of action (unless advised otherwise)is to:
1) setup everything as ext3
2) learn to setup the grubconfig stuff in Slackware.
3) Run grubconfig install grub and append a menu.lst
>
Does anyone know the location of the grubconfig help file should I fail to find it?
>
Apparently, there is a way to get a shell immediately after installation. Is it ALT-F1
>
well everybody, it's time to finish laundry,reformat some partitions to ext3, copy some help files and reinstall a distro. I should be off line for a couple.
>
Again, thanks for the replies to everybody. I'll all informed of my progress.

colorpurple21859 11-29-2009 02:53 PM

slackware's standard install doesn't come with grub installed only lilo, however slackware's grub package is located in /extra/grub on slackware mirrors if you want to install it.

veeall 11-29-2009 03:35 PM

I don't get it, why not just add slackware boot entries into menu.lst of already installed grub in /dev/sda - if, of course, there is another distro already installed. Slackware installation DVD can also be used to boot into an installed system - brief how-to is on the first screen of the installer.

(Posted by an unexperienced user) :)

yanfaun 11-29-2009 05:04 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773559)
slackware's standard install doesn't come with grub installed only lilo, however slackware's grub package is located in /extra/grub on slackware mirrors if you want to install it.



Quote:

Originally Posted by yanfaun (Post 3772788)
Greetings, all!
My two problems with "slackware 13,"*
stated as simply as possible, are as follows: After the succesful install of slackware13 to my external usb drive (/dev/sdb), I could not: 1) boot the system with the DVD. 2) I cannot boot the system with the usb flashdrive that was created with the Slackware 13 installer.

Thanks for any help

Thanks, color21859[
However, as you can see from the first three lines of my post, which appear as a quote above this sentence, installation is impossible. One must boot before installing things.

To reiterate, slackware13 has never been bootable. LILO now (finally)installs to the root of sdb1, which is bootable partition. However, neither the instllation DVD, nor the syslinux flashdrive (created with Slackware, I might add) will boot this system. Everybody keeps responding with ways to install something when the system has never been bootable be it reiser, ext4 or ext3.
>
I've taken multi-booting and grub for granted until now. I've never had so many problems doing nothing. The exasperatingly incomplete documentation on the DVD is the reason.
>
Thanks, anyway

Quote:

Originally Posted by veeall (Post 3773584)
I don't get it, why not just add slackware boot entries into menu.lst of already installed grub in /dev/sda - if, of course, there is another distro already installed. Slackware installation DVD can also be used to boot into an installed system - brief how-to is on the first screen of the installer.

(Posted by an unexperienced user) :)

Veeall
Greetings,
The two-part answer to your question is as follows: 1) It is that simple in distros other than slackware. Were it that simple of a task in slackware, there would not be so many post Google concerning grub and Slackware. 2) Please see the first three lines this post, which I believed you missed despite the 3" bold font that preceded them. For your convenience, they appear at the top of this reply too. We all miss things sometimes.

To any who would post:
Please understand that I need to make an installation of slackware 13 (currently installed on an external usb drive) bootable.
I'd prefer grub, but I'd settle for LILO doing it's job.
Problems:
1) The system claims that LILO was installed to the bootable superblock, yet the system does not boot
2)The bootable syslinux flashdrive, created by Slackware13 fails to function, exiting with err=1 invalid compression.
3) The DVD is incapable of booting hugemap or the similarly named kernel
4) Installing LILO to a usb floppy disk always fails.
>
thanks again for the responses.

colorpurple21859 11-29-2009 06:20 PM

When you chainload from grub to lilo it doesn't work or do you get to the lilo prompt and it dosen't boot slackware?

yanfaun 11-29-2009 06:51 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773712)
When you chainload from grub to lilo it doesn't work or do you get to the lilo prompt and it dosen't boot slackware?

No, you see, LILO does not function, period. It does not boot, period. Nothing boots. For me to consider chainloading, LILO would have to boot slackware. It does not, period.
Since the install of LILO returned no errors, I can only assume that it installed successfully. I think a prompt indicated as much. I would successfully chainload if LILO ever functioned. Dido for the syslinux flashdrive & booting from install DVD
Thanks
again

colorpurple21859 11-29-2009 07:28 PM

so neither one of these grub entries work:
to chainload:
rootnoverify (hd1,0) #or maybe (hd1)
chainloader +1
or directly from grub
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sdb1 #or maybe root=/dev/hdb1

yanfaun 11-29-2009 07:36 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773771)
so neither one of these grub entries work:
to chainload:
rootnoverify (hd1,0) #or maybe (hd0)
chainloader +1
or directly from grub
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sda1 #or maybe root=/dev/hda1

There would be no point in chainloading that which cannot boot on its own. Remember that LILO does not function despite the fact that is installed.

colorpurple21859 11-29-2009 07:58 PM

on the system you have on your internal harddrive mount the slackware partition and copy /boot/vmlinuz-huge-smp-2.6.?-smp from the slackware partition to the /boot of the system on your internel hardrive. Point your grub to the file and set the /dev/root of the kernel line to the external harddrive.

yanfaun 11-29-2009 10:39 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773797)
on the system you have on your internal harddrive mount the slackware partition and copy /boot/vmlinuz-huge-smp-2.6.?-smp from the slackware partition to the /boot of the system on your internel hardrive. Point your grub to the file and set the /dev/root of the kernel line to the external harddrive.

I'll give this a shot tomorrow then report back although I have misgivings.
My BIOS (excluding Slackware & this post) has consistently booted sdb, which is an external USB hard drive, be it tinycore, BSD or anything in between.
Thanks again

veeall 11-30-2009 05:35 AM

Code:

Were it that simple of a task in slackware, there would not be so many post Google concerning grub and Slackware.
My scenario has always been like that:
I have two slackware versions on different partitions, when i install new version i do not install lilo nor grub instead i'm going to populate my existing menu.lst with new boot entries. I guessed this to be simplest workaround to your problem also if this another grub is capable of booting an ext4 partition.

I can't see why 'booting with slack dvd' method doesn't work(?).

yanfaun 11-30-2009 11:50 PM

Quote:

Originally Posted by colorpurple21859 (Post 3773797)
on the system you have on your internal harddrive mount the slackware partition and copy /boot/vmlinuz-huge-smp-2.6.?-smp from the slackware partition to the /boot of the system on your internel hardrive. Point your grub to the file and set the /dev/root of the kernel line to the external harddrive.

I did not have chance to do this today, but your logic seems reasonable now that I've thought about it. You propose booting the slackware install, sdb, which is located on the external usb drive, by editing the menu.lst on the internal drive, sda. Ok! I will try it :) I am accustomed to editing sdb and avoiding editing sda because an edit of sda would leave me with a useless entry if sdb were not connected. Believe me, my sda, which boots four systems, has enough entries. However, like I said, I will try it before the week's end.

Quote:

Originally Posted by veeall (Post 3774204)
My scenario has always been like that:
I have two slackware versions... booting an ext4 partition.

...I can't see why 'booting with slack dvd' method doesn't work(?).

Veeall, Your scenario could work for me. I am just unaccustomed to doing it that way. My last three sentences to colorpurple21859, immediately above, explain why. As for the DVD not working, other than old iso files on new systems, this is the first time in my life that a new dvd iso has failed to boot an install. I am as mystified as you.

To the two of you: I'll report back before the week's end. Thanks again

marky9074 12-01-2009 11:32 AM

Just to add, I have never been able to boot from the installers USB bootable stick... I carry around the install iso on a stick and use syslinux to boot the hugesmp.s image passing the root device on the command line.. pretty much the same as you would if you were booting system from DVD...

smbell100 12-01-2009 08:21 PM

Hi

I am having similar problems booting an external usb hard drive. The boot process starts, and gives up when it cannot find the usb disk, despite loading the kernel from it. I have tried using mkinitrd, adding the ext4 and usb-storage modules, and got no further.

Booting from the DVD stops at the same place, as does booting from a USB pen drive. After using mkinitrd and modifying lilo, I at least got a boot prompt. None of the USB drives were being found.

uppman 12-02-2009 01:07 AM

Try this..

http://linuxconfig.dyndns.org/lazy/L...vable_USB_disk

/Magnus

NightSky 12-05-2009 03:45 AM

U did say your slackware installation went fine. Ok how did you boot into your 2nd Hdd? From grub on you Primary Hdd which is sda. What OS are u running on sda? Can you boot into sda? What designation does your 2nd Hdd have in your bios when you boot your primary hdd?
You installed slackware on its own hdd but designated it a Slave Drive = sdb so you are trying to but an independent OS on a hdd that has a slave designation. Set your usb drive as a Secondary Master HDD u shld be able to use your install disc to boot at this point.
fdisk /dev/sdc
*Make sure root on sdc1 has an * designating the root partition as bootable.
In setup; You can keep current slackware partition scheme, change the target designation without formating your install should be gd i use slackware12.2 but you should be able to save changes..without reinstalling... i would pkgtool remove lilo and try to just ctrl alt delete ...boot from grub lst unless there is incompatibility with ext4? Hope not so u don't have to reinstall.

Slackware was my first linux experience and i never had an install fail and I used to dualboot win + slackware but never used grub or lilo. But it doesn't make sense that you wld have to install lilo onto slackware and grub on OS sda? Too complicated. Just make sure your kernel boot image is in root@sdc:/boot and call it from grub, thats what i did with loadlin, but i think grub has a lot more functions.
The simpler the less trouble.

yanfaun 12-07-2009 10:13 PM

Thanks to al those who responded
 
Quote:

Originally Posted by smbell100 (Post 3776435)
Hi

I am having similar problems booting an external usb hard drive. The boot process starts, and gives up when it cannot find the usb disk, despite loading the kernel from it. I have tried using mkinitrd, adding the ext4 and usb-storage modules, and got no further.

Booting from the DVD stops at the same place, as does booting from a USB pen drive. After using mkinitrd and modifying lilo, I at least got a boot prompt. None of the USB drives were being found.

I'd call it an idiosyncrasy with Slackware. My guess is that they are behind the times. I've booted micro operating systems & full operating systems on everything from usb to flashdrive to Virtualbox with nary a problem. Therefore, the only remaining culprit is the idiosyncratic Slackware and its bootloader, LILO, which is even more idiosyncratic.


Quote:

Originally Posted by NightSky (Post 3780676)
U did say your slackware installation went fine. Ok how did you boot into your 2nd Hdd? From grub on you Primary Hdd which is sda. What OS are u running on sda? Can you boot into sda? What designation does your 2nd Hdd have in your bios when you boot your primary hdd?
You installed slackware on its own hdd but designated it a Slave Drive = sdb so you are trying to but an independent OS on a hdd that has a slave designation. Set your usb drive as a Secondary Master HDD u shld be able to use your install disc to boot at this point.
fdisk /dev/sdc
*Make sure root on sdc1 has an * designating the root partition as bootable.
In setup; You can keep current slackware partition scheme, change the target designation without formating your install should be gd i use slackware12.2 but you should be able to save changes..without reinstalling... i would pkgtool remove lilo and try to just ctrl alt delete ...boot from grub lst unless there is incompatibility with ext4? Hope not so u don't have to reinstall.


My disk settings (master, boot flags, etc) are fine as eveidenced by the fact that Pclinux, Suse, Ubuntu, xubuntu, Slax & tinycore boot just fine, not that they're all currently installed, well some are.




Quote:

Originally Posted by NightSky (Post 3780676)

Slackware was my first linux experience and i never had an install fail and I used to dualboot win + slackware but never used grub or lilo. But it doesn't make sense that you wld have to install lilo onto slackware and grub on OS sda? Too complicated. Just make sure your kernel boot image is in root@sdc:/boot and call it from grub, thats what i did with loadlin, but i think grub has a lot more functions.
The simpler the less trouble.

Well, that makes one of us who has not done multiple installs to no avail. You did not read accurately. Grub had been previously installed on sda and it booted everything under the sun. Slackware gives no option but to install that the excessively complicated bootloader known as LILO. Had I the option of installing grub without having to boot Slackware from the accursed LILO bootloader, I'd naught a reason to post.

Quote:

Originally Posted by uppman (Post 3776627)

This has much merit. To test this, I did the following: I changed my boot order from its current setting to anything & then I changed it back to what it was before I made changes. This resulted in Slackware booting to the Slpashscreen. How to get Slackware to boot beyond the splashscreen, without going into either windows or other distros is beyond me. It is beyond me not because of my limited experience;it is beyond mr due to the extreme weirdness of Slackware. I thought that micros-operating syste (i.e., tinycore & Slax) were weird, but at least they function as advertised. Slackware seems capable of booting windows only. Bottom line: If the system is given time to recognize the usb, it will boot it. Unfortunately, the following is true: 1) No other distro has this problem, ONLY SLACKWARE. 2) Based upon my results, the page you referenced is outdated. The commands did not work. Are you sure that it is not waitusb=10? After all, command verbiage changes with time and Distro.

Anybody? Somebody please followup

veeall 12-07-2009 11:59 PM

You don't give much details about your setup. The least, post the grub entry you used when trying to boot slackware.

If you boot from grub installed in sda along with another distro you don't have to deal with salckwares lilo at all.

How you managed to install your slackware, if dvd doesn't work? If you, still, were using slack dvd, then why it won't boot your box? Where it stumbles? Did you do everything by instructions displayed when installer starts?

I don't have an usb hdd, maybe really there lies the problem too, but after reading your post multiple times, i for one don't have a clue what your expectations were after plugging in usb disk and booting your computer - were you hopeing to boot from an boot entry on your /dev/sda grub without the need to modify it, or expected to be greeted with slackware lilo screen instead? For latter i think you should adjust your bios. Some bioses let you manually choose the boot device by hitting F11 for example, then it should load boot manager installed in chosen device be it lilo or grub.

uppman 12-08-2009 06:21 AM

Quote:

Originally Posted by yanfaun (Post 3783477)
2) Based upon my results, the page you referenced is outdated.


Well, that page was written when 12.x was hot..

I did update it for 13.0 though:

Quote:

Slackware 13.0 is delivered with a initrd.gz which can find the root filesystem by label.
Boot with: root=LABEL=PUTLABELHERE rootfs=ext4

To wait for USB, append: waitforroot=15
Here is an updated page for 13.0 (This is a customized initrd. Do try with the stock initrd first, it will probably work!):

http://linuxconfig.dyndns.org/lazy/L...L/UUID_support

Using this initrd you can boot your system by label or uuid with something like this in lilo.conf:

Code:

label linux
  kernel /boot/vmlinuz
  append /boot/initrd.gz label=SW_13.0 4

Code:

label linux
  kernel /boot/vmlinuz
  append /boot/initrd.gz uuid=1789683e-c85a-45b7-bdf1-8bb04fc6275c 4

------

Quote:

The commands did not work. Are you sure that it is not waitusb=10? After all, command verbiage changes with time and Distro.]
It is easy to get confused about the lilo boot parameters. This is how it works:

rootdelay=10 is a kernel parameter and works without an initrd.
It will cause the kernel to pause the given amount of seconds before trying to mount the root paritition.
For example using the installation DVD: hugesmp.s rootdelay=10 root=/dev/sda1

waitforroot=15 is a initrd parameter, it does the same thing but from within the initrd.
For example using the installation DVD: hugesmp.s waitforroot=15 root=/dev/sda1

HTH

/Magnus

colorpurple21859 12-08-2009 06:23 AM

did you try copying the huge kernel to your internal hardrive and booting it, what kind of errors did you get.

yanfaun 12-11-2009 08:35 PM

First, I'd like to say thanks to all the people who have made an effort to help me resolve this issue.
My reason for installing Slackware was that I wanted to use a Distro that was more technically efficient and challenging than the most popular distros.
After my negative experiences with Slackare, I now know why Grub is the default bootloder for most Distros while LILO is relegated to being an option. LILO is too old and too inflexible to boot modern usb disk. As such, it should be an option for slackware not the default. I am not a Linux Guru by any stretch of the imagination; However, I am not a newbie either. I'd like to give an example.
I refused to burn the 10mb Tinycore ISO to a 700mb cd as this seemed to be a monumental waste of a cd. Therefore, I did the mount -o loop of the image. Next, cp -p the iso image to a sdb4. I edited the menu.lst of sda, and viola, it booted sdb4 as though it were an install cd. From sdb4, I was able to install tinycore to sdb1 (root) sdb2 (backup), sdb5(swap) & sdb6 (/tmp). This is an example of problem free booting from a USB drive, which is typical of Grub, but not typical of LILO & Slackware.

Look at this thread and compare it to the foregoing example and it becomes obvious that Slackware is dedicated to keeping the outdated bootloader LILO as its default bootloader. I'd bet all I'd have to do is add "wait for usb" or "rootdelay=12" to the kernel line," but I shall not. As I said, when I change my bootloader from its current setting to anything and then back to current setting, Slackware will boot. Actually, at this point, Slackware will boot windows, but not itself. This is a first for me. Although I laud the efforts of others to help me, In the beginning of my post, I listed my goals, methods, problems and troubleshooting method. Experience indicates that this effective, yet still I am asked questions that indicate this first post was read. I am tired of questions that make ask myself, why am I being asked this? Since I've wasted enough time, unrecoverable time, I will be moving on to a distribution that is possessed of technical efficiency and a real bootloader. Apparently, this means nothing slackware based. The truth is that unless someone has a computer setup from circa 1989-1994, one can expect problems with booting Slackware. It would seem that one would have to be willing to install LILO to the MBR of SDA to guarantee a boot of everything. This is garbage for two reasons: 1)The Windows "Malicious software removal tool" will delete an installation of LILO on the MBR of SDA (aka hda or hd0,0 for some), leaving one with an unbootable system. 2) Have you ever tried to get LILO to boot a recently installed OS? I have and it was not fun nor successful. The fact that the Slackware boot flashdrive (created with the Slackware boot DVD) does not boot Slackware is a damning indictment of Slackware and its boot process; the fact that the install DVD does not boot the installation is a damning indictment of Slackware and its boot process.

>>>>>
From my usb drive (sdb) I have problem free installed and then booted half of the top 10 distros listed at Distrowatch.com without incident. It is only the Slackware based distros that have weird or inferior boot requirements.
>>>>>

Kernel panic errors when booting from the install DVD. How retarded is that?
>>>>>
Thanks for the efforts to help me, everybody. It takes a character to spend time attempting to help another, so thanks. However, if I chance to help someone in the future, before responding, I will always read the first words of their thread, especially if it is organised into problems, problem origin, goals and troubleshooting completed thus far.
>>>>>
I am deleting my Slackware install now
>>>>>

yanfaun 01-13-2010 12:30 AM

Since I am not a forum aficionado, I've no way of knowing if it's possible to mark this thread as solved. technically, only a work around has been found. Here it is.
>
My experiences & what not to do
Unlike Grub, LILO can't seem to function if it's placed in a boot partition. The purpose of a boot partition is simple: Install mutiple Linux installations on LVM, and this is important if one wants to boot Multiple installations of windows or or one installation of windows & one installation of BSD. If LILO is to be one's bootloader, keep the boot folder in root, not in a boot partition. LILO seems to function best if installed to root (assuming root is on a primary partition) or an MBR. Unlike Grub, LILO fails to function if it is installed to the root of a drive if said drive is a logical volume. Unlike Grub or BSD, LILO fails to function if installed on a USB drive, even if it's installed by itself. I know nothing of pendrive Linux and slackware. Unlike Grub, I could not install LILO to a USB floppy
My experiences & what I did:
1)During install, I put root on a primary partition, sda4, with the boot flag enabled.
2)After install, I placed the boot flag on the original boot partition, sda2.
3)Since that whole bit about putting vmlinuz in the kernel line never works, I chainloaded as shown below.
Slackware
title Slackware 13.0
root (hd0,3)
rootnoverify (hd0,3)
chainloader +1


Note: Change partitions according to your setup. I used (hd0,3) because Slackware is on /dev/sda4, which is (hd0,3) in grub. Remember, Grub counts using whole numbers not counting numbers

January 13, 2019: I am editing & deleting from this post to correct an inaccuracy in my post. I am so accustomed to marking a partition as active that I did so in Grub, resulting in my boot flag moving. I incorrectly blamed LILO. The above example will work because Grub, unlike LILO, will boot anything, USB or not.

GrapefruiTgirl 01-13-2010 12:35 AM

To mark a thread as solved, use the "Thread Tools" drop-down menu near the top of the page, just above the first post.

Sorry you have had such a hard time getting the bootloader to work the way you want! I haven't read this whole thread, but am glad you have at least got a work-around for the time being :)

Sasha

yanfaun 01-13-2010 05:44 PM

To GrapeFruiTgirl
 
Thanks for the pointers concerning Slackware config'n files & marking post.

ljones0 02-07-2010 06:11 PM

Quote:

Originally Posted by uppman (Post 3783915)
Well, that page was written when 12.x was hot..

...

http://linuxconfig.dyndns.org/lazy/L...L/UUID_support

...

I've been trying to make slackware run off USB but to no avail. I've tried following the instructions on that site linked to above there but it has a few typos?





From http://linuxconfig.dyndns.org/lazy/L...L/UUID_support :

Code:

cd  /boot
mkinitrd
cd initrd-tree
te init&

rm bin/awk
rm bin/cut

oot@localhost:/boot/initrd-tree# cp /lib/libblkid.so.1 lib/
root@localhost:/boot/initrd-tree# cp /lib/libext2fs.so.2 lib/
root@localhost:/boot/initrd-tree# cp /lib/libc.so.6 lib/
root@localhost:/boot/initrd-tree# cp /lib/libuuid.so.1 lib/
root@localhost:/boot/initrd-tree# cp /lib/libcom_err.so.2 lib/
root@localhost:/boot/initrd-tree# cp /lib/ld-linux.so.2 lib/
root@localhost:/boot/initrd-tree# cp /lib/libpthread.so.0 lin
root@localhost:/boot/initrd-tree# cp /lib/libpthread.so.0 lib/
root@localhost:/boot/initrd-tree# cp /lib/libdl.so.2 lib/
root@localhost:/boot/initrd-tree# cp /lib/libm.so.6 lib/

cp /usr/bin/awk bin/
cp /sbin/blkid bin/
cp /bin/cut bin/

cd ..

Install device files from the Slackware DVD:
mount /dev/dvd /mnt/dvd
installpkg -root /boot/initrd-tree /mnt/dvd/slackware/a/devs-2.3.1-noarch-25.t?z

Replace init with modified version

cp init_13.0.txt /boot/initrd-tree/init

mkinitrd

What does the line "te init&" mean? That line dosen't work for me; I could not find any "te" command at all.

Secondly what about "root@localhost:/boot/initrd-tree# cp /lib/libpthread.so.0 lin" ? - should "lin" be lib/? . Also what about the same library being copied twice (libpthread.so.0) . Is there an extra library to copy?

Also how much else do I need? After the above commands there's a section "Slackware 12.1 and 12.2" . Do I need that part or all of it or ?

When I tried the above instructions my initrd came out to be around 1.2MB but the one from the website is roughly twice this. Something's missing x.x .

ljones

uppman 02-08-2010 08:26 AM

Quote:

Originally Posted by ljones0 (Post 3856085)
I've been trying to make slackware run off USB but to no avail. I've tried following the instructions on that site linked to above there but it has a few typos?

---

What does the line "te init&" mean? That line dosen't work for me; I could not find any "te" command at all.

Secondly what about "root@localhost:/boot/initrd-tree# cp /lib/libpthread.so.0 lin" ? - should "lin" be lib/? . Also what about the same library being copied twice (libpthread.so.0) . Is there an extra library to copy?

"te" is an alias for my favorite texteditor. You don't need that line..

Yep, the first copy is a typo, just ignore it.

Quote:

Also how much else do I need? After the above commands there's a section "Slackware 12.1 and 12.2" . Do I need that part or all of it or ?
You only need to read and understand the procedure for 12.1/12.2.. :) I was to lazy to rewrite everything for 13.0.

Quote:

When I tried the above instructions my initrd came out to be around 1.2MB but the one from the website is roughly twice this. Something's missing x.x .
Did you install the dev files?

I might also have copied some extra modules, don't remember..

/Magnus

ljones0 02-08-2010 03:36 PM

I removed all the files off my USB disk and tried again from scratch. This time I did a bit better - the initrd.gz file I made this time comes in at 2.1MB, which works better. I'm using a label on the USB stick I'm using to boot from. But unfortunatly it dosen't complete - it almost works but fails with ....

Code:

/sbin/e2fsck: Unable to resolve 'label=xyz'
The boot process stops there; the partition is detected previous to this (I called it "xyz") and booting starts its just it gets to this point and fails.

Code:

fstab

label=xyz        /                ext3        defaults        1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

Code:

syslinux.cfg

default 1
prompt 1
say booting!.........

label 1
kernel vmlinuz
append initrd=initrd.gz label="xyz"

Code:

Partitions on USB stick (sdb) from cfdisk
sdb1 Boot Primary W95 FAT32  Label=[        ] 106.93MB
sdb2      Primary Linux ext3 Label=[xyz]      526.42MB

Booting reaches the part where there's the 10 second wait for USB to settle and the "xyz" partition is found and carries on, only that it fails at e2fsck.

ljones

Alien Bob 02-08-2010 03:43 PM

Try uppercase "LABEL" in your /etc/fstab. The lowercase "label" is not supported.

Eric

uppman 02-08-2010 03:50 PM

Quote:

Code:

fstab

label=xyz        /                ext3        defaults        1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

Booting reaches the part where there's the 10 second wait for USB to settle and the "xyz" partition is found and carries on, only that it fails at e2fsck.

ljones
I'm not sure but I think it should be LABEL and not label..
In any case you are better off using /dev/root, see below.

http://linuxconfig.dyndns.org/lazy/L...vable_USB_disk

IMPORTANT: /etc/fstab must always contain the correct device to mount as root. It is possible to use the filesystems UUID or LABEL in /etc/fstab if the USB disk gets a different devicename like /dev/sdc instead of /dev/sda between reboots.
It is also possible to use /dev/root if the kernel and system supports it.
Something like this:
/dev/root / ext4 defaults 1 1
or this:
LABEL="SW_13.0" / ext4 defaults 1 1

/Magnus

ljones0 02-08-2010 04:09 PM

Ah :) Thank you both -- using LABEL="xyz" worked (as did /dev/root);

Code:

fstab

LABEL="xyz"        /                ext3        defaults        1  1

*or*

/dev/root        /                ext3        defaults        1  1

My next job will to be to grab another memory stick and try to do everything right from scratch making a note of every step I take. Then I hope to post a list of instructions here!

:)

ljones

ljones0 02-09-2010 02:46 AM

:-( Uh oh.....


Looks like there are more problems. I'm finding although it will work on some machines it completely fails on others. On my EEE PC (x86) for example it works with no problems, so does the emulator qemu. However I have two other systems here, one around a year old (x86-64) and another about 3 or so years old also x86-64 and these both fail to boot. The former dosen't see the partition on the USB stick, the latter dosen't even get that far.

Wonder what could be wrong, maybe something to do with x86-64 or USB drivers?

Will take the USB stick to work and try on a couple of x86(not 64 bit) systems, see what happens.

ljones

ljones0 02-09-2010 01:29 PM

Well I can confirm the USB stick worked on one system at work. This system was a 32-bit system and not a 64-bit one. The others were all too old and didn't even attempt to boot x.x .

The 32-bit version definately dosen't seem to work in a 64-bit system x.x . Maybe USB driver problem?

I've now been trying to make a 64-bit version of the above using the instructions but I'm hitting apon a problem. With the 64 bit version I've made the partition is detected OK until time comes to run the commnads "awk","blkid" and "cut". These don't seem to want to run even if I use chmod 0777 awk, chmod 0777 blkid and chmod 0777 cut and then remake the initrd file. The system complains that they don't exist (and refuses to run them),e.g.

(this is at the point after the partition on the usb stick has been detected);

Code:

/init: line 292 /sbin/blkid: not found
Found:
/init: line 292: awk: not found
/init: line 292: awk: not found
Didn't find the root partition! Try again or exit to a shell?

I can also try to run the commands manually but with no success .....

Code:

cd /bin
$ awk
awk : command not found
$ ./awk
awk : command not found

$ ls /bin/awk
awk

syslinux.cfg
Code:

default 1
prompt 1
say boot 1 or 2

label 1
say Loading 32
kernel vmlinuz
append initrd=initrd.gz label="xyz"

label 2
say Loading 64
kernel 64
append initrd=initrd64.gz label="64"

However looking with the ls command shows these files/commands definately exist. Wonder what could be wrong, maybe I need an extra library for 64 bit stuff?

syslinux directory
Code:

drwxr-xr-x 2 aaaaa root 2.0K 2010-02-09 19:02 .
drwxr-xr-x 5 aaaaa root  16K 1970-01-01 00:00 ..
-rwxr-xr-x 1 aaaaa root 4.8M 2010-02-09 17:43 64
-rwxr-xr-x 1 aaaaa root 2.1M 2010-02-08 18:46 initrd.gz
-rwxr-xr-x 1 aaaaa root 2.7M 2010-02-09 19:02 initrd64.gz
-rwxr-xr-x 1 aaaaa root  181 2010-02-09 18:07 syslinux.cfg
-rwxr-xr-x 1 aaaaa root  188 2010-02-09 18:07 syslinux.cfg~
-rwxr-xr-x 1 aaaaa root 4.8M 2010-02-07 22:57 vmlinuz

Note that the '64' is the 64 bit vmlinuz.

USB Stick Partitions:
Code:

sdb1 - Boot - Primary - W95FAT32  [          ] 106MB
sdb2 -        Primary - Linux Ext3 [xyz]        526MB (32 bit Slackware)
sdb3 -        Primary - Linux Ext3 [64]        584MB (64 bit Slackware)

fstab from /dev/sdb3 (contains 64 bit slackware install);
Code:

/dev/root        /                ext3        defaults        1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

ljones

uppman 02-09-2010 02:11 PM

Quote:

Originally Posted by ljones0 (Post 3857549)
:-( Uh oh.....


Looks like there are more problems. I'm finding although it will work on some machines it completely fails on others. On my EEE PC (x86) for example it works with no problems, so does the emulator qemu. However I have two other systems here, one around a year old (x86-64) and another about 3 or so years old also x86-64 and these both fail to boot. The former dosen't see the partition on the USB stick, the latter dosen't even get that far.

Wonder what could be wrong, maybe something to do with x86-64 or USB drivers?

Will take the USB stick to work and try on a couple of x86(not 64 bit) systems, see what happens.

ljones

Did you install the "devs" slackware package? The default initrd only comes with hda1-9 or sda1-9..
Try cat /proc/partitions to see any partitions without dev files.

Which kernel are you using, huge, huge-smp or the generic? I have succesfully tested with huge-smp for both 32 and 64-bit using a 32-bit initrd.

/Magnus

ljones0 02-09-2010 02:34 PM

For both the 32 & 64 bit installs yep definately installed the devs slackware package. I looked at /proc/partitions after booting off the USB stick (32 bit partition) and got this;

Code:

major minor  #blocks  name
 8      0    78150744  sda
 8      1    16000708  sda1
 8      2          1  sda2
 8      3    498015  sda3
 8      5    8000338  sda5
 8      6    8000338  sda6
 8    16    7823360  sdb
 8    17    104391  sdb1
 8    18    514080  sdb2
 8    19    570307  sdb3

For the 32 bit install I used kernel vmlinuz-huge-smp-2.6.29.6-smp


*EDIT*

If I tried a 32 bit vmlinuz with a 64 bit initrd/system then it failed completely. Got these messages;

Code:

request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Freeing unused kernel memory: 456k freed
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Failed to execute /init
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

x.x

ljones

ljones0 02-09-2010 06:23 PM

1 Attachment(s)
if it helps here's a picture of what happens on the 64 bit system when it fails (using both a 64 bit initrd & vmlinuz).

ljones

uppman 02-10-2010 12:31 AM

Quote:

Originally Posted by ljones0 (Post 3858176)

If I tried a 32 bit vmlinuz with a 64 bit initrd/system then it failed completely. Got these messages;

Code:

request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Freeing unused kernel memory: 456k freed
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Failed to execute /init
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

x.x

ljones

You CAN use a need a 32-bit initrd with a 64-bit kernel. That's what I do to boot a 64-bit system.

I haven't tried to build a 64-bit initrd. It most likely needs another set of libraries and executables (64-bit).

By the way, which 64-bit kernel did you use?

/Magnus

bkmz222 02-10-2010 03:24 AM

WHY do you need initrd? I boot my slackware just with rootdelay and directly specifiing root. i.e. in GRUB:
Code:

linux (hd1,6)/boot/vmlinuz root=/dev/sdb6 rootdelay=10

ljones0 02-10-2010 12:29 PM

Quote:

Originally Posted by uppman (Post 3858635)
You CAN use a need a 32-bit initrd with a 64-bit kernel. That's what I do to boot a 64-bit system.

I haven't tried to build a 64-bit initrd. It most likely needs another set of libraries and executables (64-bit).

By the way, which 64-bit kernel did you use?

/Magnus

Not sure what I'm doing wrong to make it fail on my system with a 32-bit initrd/64 bit kernel.

Yep quite agree :) 64 bit likely needs different libraries and executables. I followed the slackware 13 (32-bit) instructions to try them out but on a 64 bit system. I didn't see any dependency issues though, I even checked the libraries with ldd.

For the 64 bit kernel I used vmlinuz-huge-2.6.29.6 . Thats the one my normal slackware 64-bit system boots up with.

ljones

ljones0 02-10-2010 12:49 PM

1 Attachment(s)
BTW here's what I get if I use a 32 bit initrd and a 64 bit kernel ....

ljones

uppman 02-10-2010 04:08 PM

Quote:

Originally Posted by ljones0 (Post 3859347)
BTW here's what I get if I use a 32 bit initrd and a 64 bit kernel ....

ljones

It doesn't seem to run the initrd.. strange.

ljones0 02-10-2010 04:38 PM

Not sure why it wouldn't run the initrd. Its even specified in the syslinux.cfg .... I'm not sure what could be wrong. Not sure what to do next, maybe start from scratch?

ljones

uppman 02-11-2010 12:01 AM

Quote:

Not sure why it wouldn't run the initrd. Its even specified in the syslinux.cfg .... I'm not sure what could be wrong. Not sure what to do next, maybe start from scratch?
Did you actually see "Loading initrd..."?

Quote:

wxr-xr-x 5 aaaaa root 16K 1970-01-01 00:00 ..
-rwxr-xr-x 1 aaaaa root 4.8M 2010-02-09 17:43 64
-rwxr-xr-x 1 aaaaa root 2.1M 2010-02-08 18:46 initrd.gz
-rwxr-xr-x 1 aaaaa root 2.7M 2010-02-09 19:02 initrd64.gz
-rwxr-xr-x 1 aaaaa root 181 2010-02-09 18:07 syslinux.cfg
-rwxr-xr-x 1 aaaaa root 188 2010-02-09 18:07 syslinux.cfg~
-rwxr-xr-x 1 aaaaa root 4.8M 2010-02-07 22:57 vmlinuz
You could try to remove syslinux.cfg~ since it might interfere with syslinux.cfg. I have had similar problems with isolinux.

ljones0 02-11-2010 12:39 PM

Quote:

Originally Posted by uppman (Post 3859988)
Did you actually see "Loading initrd..."?

You could try to remove syslinux.cfg~ since it might interfere with syslinux.cfg. I have had similar problems with isolinux.

The text zips off the screen so quick its hard to read(!). So I came up with an idea (!!) I filmed the PC with the USB stick in starting up.

I didn't see it come up with loading initrd at all x.x ! I tried getting rid of syslinux.cfg~ and rerunning syslinux but it didn't seem to have any effect.

ljones

ljones0 02-12-2010 01:21 PM

Over the weekend I hope to try a whole new USB stick and start again totally from scratch. Maybe it is just some sort of weird compatibility problem?

ljones

uppman 02-12-2010 01:36 PM

Quote:

Originally Posted by bkmz222 (Post 3858731)
WHY do you need initrd? I boot my slackware just with rootdelay and directly specifiing root. i.e. in GRUB:
Code:

linux (hd1,6)/boot/vmlinuz root=/dev/sdb6 rootdelay=10

ljones, have you tried this metod? It should work in most cases with the huge kernel.
You can boot from the installation DVD and start you USB-stick from there.

/Magnus

ljones0 02-13-2010 01:48 PM

Quote:

Originally Posted by uppman (Post 3861769)
ljones, have you tried this metod? It should work in most cases with the huge kernel.
You can boot from the installation DVD and start you USB-stick from there.

/Magnus

Nope, not tried it yet. I must admit to have never even used grub, I'd have to try to find out how to use it. I wonder if it can be put on a USB Stick, maybe it works better than syslinux? (no idea!).

Speaking of syslinux and USB sticks I went right back and redid the whole thing, started from scratch, 32 bit only initrd & vmlinuz.

I tried booting the finished result on a 64 bit system.

Here's roughly what I did;

1. Do a minimal (32 bit) (only the stuff out of slackware 'a', so no 'ap','x' etc) install to hard drive (hda1). Edited /etc/fstab and changed the first line from "/dev/hda1" to "/dev/root". Note that this time around I used a real 32 bit system to do this on, before I was using qemu to try to do the same thing.

2. Tar'd everything installed (from hda1), moved the file to a clean (empty) USB stick (USB Stick partitioned with 2 partitions; sda1 as a small fat32 partition, sda2, linux).

3. Untar back to the USB stick from the tar file onto sda2.

4. Wipe hard drive, do a more thorough install and made a brief script;

Code:

#!/bin/sh

oldhome=`pwd`

cd /boot
rm -r -f /boot/initrd-tree
rm /boot/initrd.gz

mkinitrd

cd initrd-tree

rm bin/awk
rm bin/cut

cp /lib/libblkid.so.1 lib/
cp /lib/libext2fs.so.2 lib/
cp /lib/libc.so.6 lib/
cp /lib/libuuid.so.1 lib/
cp /lib/libcom_err.so.2 lib/
cp /lib/ld-linux.so.2 lib/
cp /lib/libpthread.so.0 lib/
cp /lib/libdl.so.2 lib/
cp /lib/libm.so.6 lib/

cp /usr/bin/awk bin/
cp /sbin/blkid sbin/
cp /bin/cut bin/

cd /boot

installpkg -root /boot/initrd-tree /root/files/devs-2.3.1-noarch-25.t?z

cp /root/files/init_13.0.txt /boot/initrd-tree/init

mkinitrd

cd $oldhome

Note that I had the init_13.0.txt in the /root/files dir as well as the devs package.

5. made directory syslinux on the usb stick's fat 32 partition (sda1) and copied /boot/initrd.gz into it along with the already existing /boot/vmlinuz as installed there by slackware itself.

6. Then did syslinux -s /dev/sda1

7. Unmount, remove USB stick from 32 bit system plug into 64 bit and try it out - !

I went back to a normal 32 bit vmlinuz and initrd.gz, but the result was that it still didn't find the partiton and I got dumped out to a command line. The USB stick's linux partition (sda2) this time I named "USB".

After getting dropped out to a command line I tried to look at the init_13.0.txt script to try to see if anything's amiss there.

Here's the results after typing 'set';

(Might be typos from here on as I've had to type these manually off a digital camera - !).

Code:

BOOT_IMAGE='vmlinuz'
HOME='/'
IFS='
'
OPTIND='1'
PATH='/sbin:/usr/sbin:/bin:/usr/bin'
PPID='1'
PS1='\w \$'
PS2='> '
PS4='+ '
PWD='/'
TERM='linux'
_='clear'
initrd='initrd.gz'
label="USB"

So I was looking through the init script and saw stuff, such as ....

Code:

INITRD=`cat /initrd-name`
#ROOTDEV=`cat /rootdev`
#ROOTFS=`cat /rootfs`
LUKSDEV=`cat /luksdev`
RESUMEDEV=`cat /resumedev`
WAIT=`cat /wait-for-root`
KEYMAP=`cat /keymap`

Doing these manually, e.g. cat /initrd-name produced the same result, nothing!

I see after this the script uses a variable called ARG,i.e.

Code:

# Parse command line
for ARG in `cat /proc/cmdline`; do
  case $ARG in
    rescue)
      RESCUE=1
..

echoing $ARG to the screen returned nothing. However, doing this seemed to work a little better;

Code:

for ARG in `cat /proc/cmdline`; do
 echo $ARG
done

produces

BOOT_IMAGE=vmlinuz
initrd=initrd.gz
label="USB"

And typing
Code:

echo $ARG | cut -f2 -d=
manually after this produces "USB". Complete with the quotes. I could put the `` after the -d= there, I get the same result.

But then there's a variable called LABEL_FOR_ROOT but this seems to be totally blank, nothing, empty. I don't profess to be a developer or anything but it almost looks like something could be failing in this piece:

Code:

# Parse command line
for ARG in `cat /proc/cmdline`; do
  case $ARG in
    rescue)
      RESCUE=1
    ;;
# Added by Magnus Uppman 
    label=*)
      LABEL_FOR_ROOT=`echo $ARG | cut -f2 -d=`
    ;;
    uuid=*)       
      UUID_FOR_ROOT=`echo $ARG | cut -f2 -d=`
    ;;
    install)       
      RESCUE=2
    ;;
#
    root=/dev/*)
      ROOTDEV=`echo $ARG | cut -f2 -d=`
    ;;
    rootfs=*)
      ROOTFS=`echo $ARG | cut -f2 -d=`
    ;;
    luksdev=/dev/*)
      LUKSDEV=`echo $ARG | cut -f2 -d=`
    ;;
    waitforroot=*)
      WAIT=`echo $ARG | cut -f2 -d=`
    ;;
    root=LABEL=*)
      ROOTDEV=`echo $ARG | cut -f2- -d=`
    ;;
    resume=*)
      RESUMEDEV=`echo $ARG | cut -f2 -d=`
    ;;
    0|1|2|3|4|5|6)
      RUNLEVEL=$ARG
    ;;
  esac
done

Code:

echo $LABEL_FOR_ROOT  ==>
I am not 100% sure how that works but it dosen't seem to set LABEL_FOR_ROOT at all. Not sure why though!

ljones


All times are GMT -5. The time now is 01:25 AM.