LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Lilo booting to flash drive (https://www.linuxquestions.org/questions/slackware-14/lilo-booting-to-flash-drive-4175453724/)

Erik_FL 03-20-2013 06:39 PM

Quote:

Originally Posted by waddles (Post 4915471)
Ubuntu it is vmlinuz-3.2.0-29-generic-pae
Changed the Ubuntu stanza to:
image = /media/disk-1/boot/vmlinuz-3.2.0-29-generic=pae
# initrd = /media/disk-1/boot/initrd.img # Unneccesary for kernel
root = /dev/sdc5 # "UUID=6E98-297F"
append="rootdelay=20"
label = Ubuntu
read-only

If this is exactly what you have in "lilo.conf" then there is an error on the "image =" line. The file name should have a dash after "generic" and it has an equals symbol. Two equals symbols in the line might cause a syntax error, since there are no quotes around the file name. With quotes around the file name I would expect you to get a "file not found" error.

waddles 03-21-2013 12:05 AM

Believe it or not but I am fighting with Vista glasses over the prescription they gave me. Yes that = should not have been there.
I just changed it to the - it should be and ran lilo -t -v to get a Fatal: open /media/disk-1/boot/vmlinuz-3.2.0-29-generic-pae: No such file or directory
I did another df -h and now do not see the flash drives again. Slackware 13.37 was installed as 2.6.37.6-smp very vanilla. I would like to know why these flash drives are not being registered consistently with the df command. This is very troubling. I also not able to see them in fstab but do see them in /media/disk-1/boot.
With the configuration for Ubuntu as corrected will grub be a problem?

Didier Spaier 03-21-2013 12:23 AM

Quote:

Originally Posted by waddles (Post 4915687)
I just changed it to the - it should be and ran lilo -t -v to get a Fatal: open /media/disk-1/boot/vmlinuz-3.2.0-29-generic-pae: No such file or directory

Isn't that exactly what Erik told you in his last post?
Quote:

Originally Posted by waddles (Post 4915687)
I did another df -h and now do not see the flash drives again. Slackware 13.37 was installed as 2.6.37.6-smp very vanilla. I would like to know why these flash drives are not being registered consistently with the df command.

They are not registered with the df command but by the kernel.
In any case there is no reason for a removable device to be consistently registered across reboots. That is the reason why I advised you to name them by UUID instead of the location in the /dev tree.
But maybe you forgot to read post #2?
Oh, and don't not confuse "registered" with "mounted as".
And the mount point can vary as well, as it could be set manually or by an auto-mounter. Furthermore I am not sure that all desktops (using auto-mounting) will set the same mount-point for a given device.
So, as already advised,run the 'df' command just before running lilo, and edit /etc/lilo.conf accordingly as needed.

waddles 03-21-2013 01:00 AM

I hardly believe the inconsistency (worrisome) I went back to add some comments (and only comments) to the Ubuntu stanza and got a different error. The one Didier pointed out of exceeding 31 characters. So I then commented out the Ubuntu completely and used Mint and the test added the Mint and so did an install via lilo. That added Mint, no length problem.
When I rebooted into Mint I got:
Loading Mint
Error 0x01
boot Mint
and it hung there. Will try to find what that means unless someone comments.
@Didier: re Erik's note on file not found. Yes but have to test always.
re post #2 I suspended use of UUID simply to follow what I see being used when reading and due to lack of familiarity with its use. Trying to keep things known at my end.
re registered correct probably should have used recognized.
Yes it is automounting but they do not show up in fstab. Shouldn't they? They aren't in mtab either. I had thought that mounting a file is supposed to show up in fstab but maybe that is only devices.

waddles 03-21-2013 05:23 AM

There must be something seriously wrong. I have been covering the alternative boot stanzas with #. Just a moment ago I wanted to rerun the Mint and uncovered it. NOW it says no such file and nothing has changed since I used it to get Mint added and the resulting error message on trying to boot it. By nothing has changed I mean in the commands I only preceded commands with # and removed same. This is nuts. I think I am going to have to bring down the current LILO and try that as there seems to be more than the 31 character flaw.

Didier Spaier 03-21-2013 06:16 AM

Quote:

Originally Posted by waddles (Post 4915849)
There must be something seriously wrong.

PEBCAK, maybe?
Sorry, I couldn't resist :redface:

Erik_FL 03-21-2013 04:10 PM

Quote:

Originally Posted by waddles (Post 4915711)
Yes it is automounting but they do not show up in fstab. Shouldn't they? They aren't in mtab either. I had thought that mounting a file is supposed to show up in fstab but maybe that is only devices.

The "/etc/fstab" file tells Linux what to mount when Linux starts up. So, "fstab" only contains what you have put there using the editor. Think of "fstab" as the list of things that are to be automatically and permanently mounted. You might find it less confusing to add your flash disks to "/etc/fstab" in Slackware, since they will always be mounted on every boot.

This is the most accurate way to see what is actually mounted at any point in time.

Code:

cat /proc/mounts
The "proc" directory is a file-system with "live" information. In some cases (write protected root file-system) the "/etc/mtab" information may be incorrect.

Quote:

Originally Posted by waddles (Post 4915711)
When I rebooted into Mint I got:
Loading Mint
Error 0x01
boot Mint
and it hung there.

That error (0x01) usually means that the BIOS could not access the disk drive. In your case, the flash drive was not detected by the BIOS on boot, or the BIOS drive ID for the flash disk changed after you ran "lilo".

Does your BIOS always detect the flash drive? Does the BIOS always put the flash drive in the same place in the list of boot devices? If you don't plug or unplug flash drives or hard disks, your BIOS should assign the BIOS drive IDs the same way every time that you boot. Do not plug or unplug disks between using "lilo" and trying to boot.

I get the impression that you might have two flash drives. Is that correct? If you do have two flash drives then be careful not to switch where they are plugged in between running "lilo" and trying to boot.

If your flash drive appears as two different devices it might be a U3 flash drive that appears as both a CD and a disk drive. LILO cannot load a file from a CD, and will not boot from an operating system in the CD device of a U3 flash. Older SanDisk Cruzer flash drives are likely to be U3.

You can tell if your USB drive was mounted as a CD. When you use "cat /proc/mounts" you will see something like this.

Code:

/dev/sdd /media/disk1 iso9660 ro,relatime 0 0
The important thing to look for is "iso9660". LILO can't load an operating system from the "iso9660" file-system on a CD-ROM because the BIOS does not assign a BIOS disk ID to a CD-ROM. The same is true for any other kind of optical disk, CD, DVD, etc.

If you look in your BIOS, a U3 flash drive will appear as another CD or DVD drive in the list of boot devices. It will also appear as a hard disk in the list of boot devices.

A "normal" flash drive will be detected as one hard disk device. The partitions should all have the same device name with a different partition number on the end. For example "/dev/sdd" for the disk, with "/dev/sdd1" and "/dev/sdd5" for partitions. The BIOS should show that as only a single hard disk added to the boot devices. If you choose the flash disk as a boot device then the BIOS will load the MBR from the flash disk.

It will be less confusing if you focus on one problem at a time, and then do only the things suggested to fix that one problem. When you change other things and post additional problems it is hard to follow exactly what you are trying to do at the moment.

My suggestion is to choose either Ubuntu or Mint, and then try to get these things to work for that one OS.
  • Mount the flash partition for the other OS
  • Use "cat /proc/mounts" to check for the flash partition being mounted
  • Use "ls /path.../vmlinuz" to check for the file used in "lilo.conf". Replace "path..." with the actual path.
  • Install LILO using Slackware
  • Do not change BIOS settings. Do not plug or unplug USB devices.
  • Boot from the other Linux OS using Slackware LILO

To do that you choose the Slackware hard disk as the boot device in the BIOS. In other words, don't change the default boot device in the BIOS.

Decide how you are going to mount the flash disk when you run "lilo". Are you going to type in a mount command, or are you going to add the flash disk to "/etc/fstab" in Slackware? Be consistent and always mount the flash disk the same way. Otherwise, nobody can be sure what file name should be in "lilo.conf".

You may not be aware of this, but when you click on the flash disk in the graphical desktop, that can automatically mount the partition. Depending on which account you use and which order you click on the partitions they may not always have the same name. To avoid confusion you should either use "fstab" or manually mount the partitions. Create your own mount points and then mount the partitions using those mount points. For example you can use "/ubuntu" or "/mint" for a mount point. Create empty directories for mount points. Then your file names will always be the same. For example: "/ubuntu/boot/vmlinuz" or "/mint/boot/vmlinuz".

Since you are going to try to get one other OS to load, you should only have to mount one partition before running "lilo".


All times are GMT -5. The time now is 02:43 AM.