Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
12-27-2007, 11:04 AM
|
#1
|
LQ Newbie
Registered: Sep 2005
Location: Timisoara
Distribution: Slackware
Posts: 4
Rep:
|
Get the correct boot device
If I have an IDE and a SATA or SCSI disk, and both are recognize by BIOS and Linux, it is possible to find where the BIOS boot from without parsing grub/lilo conf files or reading this info from BIOS? Is it a place where Linux save such an information?
Thanks.
|
|
|
12-27-2007, 11:20 AM
|
#2
|
Member
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528
Rep:
|
Open a terminal and type cfdisk it will show the bootable partition. If you have a mix of harddrives ie. IDE/SATA/SCSI chose the dev. to look at cfdisk /dev/sdx
|
|
|
12-27-2007, 11:34 AM
|
#3
|
LQ Newbie
Registered: Sep 2005
Location: Timisoara
Distribution: Slackware
Posts: 4
Original Poster
Rep:
|
Get the correct boot device
So, for a mix of harddisks can I assume that only one partition from all of them is marked as bootable? Isn't it possible to have 2 bootable marked partitions on 2 different disks?
|
|
|
12-27-2007, 12:40 PM
|
#4
|
Senior Member
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Rep:
|
Quote:
Originally Posted by scristiv
Isn't it possible to have 2 bootable marked partitions on 2 different disks?
|
Yes it is. You need to make sure that the drive you want to boot from is the only one with a partition with the "bootable" flag. In fdisk, it is the "a" command.
|
|
|
12-28-2007, 07:32 AM
|
#5
|
LQ Newbie
Registered: Sep 2005
Location: Timisoara
Distribution: Slackware
Posts: 4
Original Poster
Rep:
|
So in the worst case somebody have to decide which is the bootable disk. You can not do that from a script or program.
Thanks.
|
|
|
12-28-2007, 08:16 AM
|
#6
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
The hard disks should be described according to their model names in the Bios. They are detected in the order built into the mobo which typically detect the IDE controller (for Pata disks) before scanning the Sata disk controller. eSata is present and simulated as a SCSI may go straight to the front of the detection.
The disk order in the Bios can be rearranged by the user but the controllers have an impact on how the disks are subsequently named in a Linux.
The first disk shown up in the Bios is always booted first if there is no other bootable medium before the hard disk.
This is an example of one Sata, one Pata and one eSata.
The Bios was arranged to boot the Sata as the first disk so it booted up as sda in Slax, Debian, Slackware but as sdc in Ubuntu. Ubuntu's gave sda to eSata and sdb to the Pata but booted sdc as the first disk.
When a floppy was introduced and booted, thereby the hard disk order instructed in the Bios was not executed, the 1st disk recognised is the Pata, the second Sata and the last eSata.
I know the abouve is as clear as mud but the things to remember are
(1) If hard disk is to be booted then the first disk nominated in the Bios will get booted.
(2) The disk device names in the Linux are controlled by the controllers and remain unchanged. However different Linux may assisgn different names.
(3) Within the same type of hard disks the connectors on the mobo can also determine the device names. Thus 3 Sata connected to Sata 1, 2, 3 with have sda assigned to No 1, sdb assigned to No.2 and sdc assigned to No.3, even if you elect to put sdc as the first disk and boot it up.
The above cannot be controlled by a script. It is more important to understand what is done in the hardware first and then anticipate it in the software second.
Last edited by saikee; 12-28-2007 at 08:18 AM.
|
|
|
12-28-2007, 03:23 PM
|
#7
|
LQ Newbie
Registered: Sep 2005
Location: Timisoara
Distribution: Slackware
Posts: 4
Original Poster
Rep:
|
I know that in Windows the signature (disk identity) of the booted MBR is stored in Registry and is the basis to index all the disk devices, also I know that with a compliant PnP BIOS you can get the list of the bootable devices (network, disk, floppy, etc) and the boot priority list and you have access to these even from protected mode (Windows/Linux OS), but my question is: Linux stores somewhere this signature?
|
|
|
12-28-2007, 03:36 PM
|
#8
|
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Rep:
|
But one can installs a MS Windows in the 1st disk and then relocates it to boot up as the 2nd, 3rd, 4th, 5th ....disk.
I had Vista and XP in an internal disk, cloned it to an eSata and boot it up as an external disk.
A Windows, just like any PC system, has to work with the Bios information which can be rearranged by the user or the boot loader.
Each PC system when installed will have the information of which partition and which disk recorded in the system. For a Linux the information is jointly held in the boot loader configuration file, which is /boot/grub/menu.lst for Grub and /etc/lilo.conf for Lilo, and the /etc/fstab. The latter is the partitions a kernel must load in order to complete the booting of the Linux.
A Linxu can be relocated anywhere in the PC in different partition or different disk ( or a different computer). Updating the above files will fire up the Linux again.
Unlike MS systems there is no restriction to prevent the migration of Linux.
Last edited by saikee; 12-28-2007 at 03:41 PM.
|
|
|
All times are GMT -5. The time now is 07:17 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|