LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 04-21-2010, 02:23 PM   #1
daweefolk
Member
 
Registered: Sep 2009
Distribution: raspbian
Posts: 94

Rep: Reputation: 15
lilo install: mbr of "first drive"?


i'm installing slack on my usb drive. when installing lilo, i'm asked if i want to install on the mbr of my first drive. by first drive, does it mean the first hard drive i selected (being /dev/sdb)? or the first first drive (i.e. /dev/sda, which is my laptop)?
 
Old 04-21-2010, 03:10 PM   #2
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Is the installation for that laptop or is it portable?
If it is the first, then to the laptop disk.
If it is the second, then the usb disk.
Be sure not to set slackware as the native boot environment and reset the timer to 10 seconds.
 
Old 04-22-2010, 07:35 PM   #3
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
To be more exact, "first drive" refers to the first hard disk in the BIOS boot sequence of drives. The BIOS assigns hexadecimal drive identifiers like this.

80 - First hard disk drive
81 - Second hard disk drive
82 - Third hard disk drive
83 - Fourth hard disk drive

When installing LILO from Linux, LILO has to figure out the BIOS drive ID associated with any device name that you provide. The "first" hard disk drive may change if you attach a new drive (including USB). Look in your BIOS to see the order it lists the drives in the boot sequence. If you change the order drives are checked for booting then the first drive or others may change. You may have to reinstall LILO.

The BIOS only knows about hard disk drives such as "hda" and not partitions such as "hda1". Because of that LILO has to save information about the sector offset location for files that it needs to get LILO started.

Linux may assign any device name to the "first hard disk drive" depending on how the BIOS assigns drive IDs to drives. The first hard disk drive isn't necessarily the one that was booted by the BIOS, but it is usually the first hard disk that the BIOS tries to boot.

Sometimes LILO gets the drive IDs wrong and there are LILO options to specify the exact relationship between Linux devices and BIOS drive IDs.

disk=/dev/sda
bios=0x80
disk=/dev/hda
bios=0x81

Every BIOS can use a different set of rules to assign drive IDs so watch out for problems when you change the order that drives are booted in the BIOS. It may cause unrelated drive IDs to change as well as the ones for the old and new "first disk drive" in the list. Plugging in a USB drive may change BIOS drive IDs if the BIOS has never detected a USB hard disk and added one into the list.

I find that a GRUB boot disk is useful because GRUB has a "find" command that will identify which drives contain a file.

find /boot/vmlinuz

When you boot GRUB from a CD or floppy into "native" command mode then it names disks based on BIOS drive IDs.

(hd0) - 80 hex
(hd1) - 81 hex
(hd2) - 82 hex
(hd3) - 83 hex

Partitions are named like this.

(hd?,0) First Primary partition (or extended)
(hd?,1) First Primary partition (or extended)
(hd?,2) First Primary partition (or extended)
(hd?,3) First Primary partition (or extended)
(hd?,4) First Logical partition inside Extended partition
(hd?,5) First Logical partition inside Extended partition

Replace the "?" with the number of the drive, 0, 1, 2, etc. For example, "(hd1,3)" for the second drive, fourth partition.

When you run GRUB from Linux it has to figure out the drive IDs from the device names just like LILO, and can get them wrong. There is a "map" file that you can create to tell GRUB the device to drive ID mapping. Booting into GRUB native command prompt without Linux avoids the problem since GRUB accesses all drives through the BIOS drive IDs and not Linux device names.

There are other ways to determine drive IDs, including using FREEDOS or some other OS that can call the BIOS directly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lilo says, "L 01 01 01" and fdisk says, "Unable to seek on /dev/hda1" clausawits Linux - General 3 12-31-2007 09:33 PM
uninstall boot loader "Lilo" install "Grub" sethis Linux - Newbie 6 11-30-2006 09:32 AM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
"Disk boot failure..." after lilo writes to the MBR alexko Linux - Hardware 6 11-16-2004 09:43 AM
Will "grub-install /dev/hda" kill Windows XP MBR? Zullocrit Linux - Newbie 3 09-25-2004 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration