Linux - NewbieThis 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.
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.
Hi all, just bought a new PC with two HDD, one SATA, the other ATA. The ATA drive is the slave and has OpenSUSE 10.3 (Beta) installed, GRUB is also installed here. The master (SATA) has windwos XP installed nothing else.
What I wanted to do was when the family want to use the computer, they would just need to turn it on and windows would boot, no GRUB or any other kind of bootloader, and if I wanted to load linux I would select the boot menu and choose to boot from the disk with linux and grub installed. So after the install I deleted grub and applied fixmbr to the windows MBR to get it back to a "silent" boot, and installed grub on the secondary linux HDD. But when I tell the bios to boot from the secondary drive, nothing happens like it can't find a MBR and then boots windows on my first disk, with no error messages, like its doing what I told it to.
Just realised:The primary master is the DVD drive, and the slave is the ATA HDD. The SATA HDD is listed separately in the BIOS (obviously! The IDE connector would have to be share between the DVD and secondary HDD, cos there is only one IDE connector on this mobo, the SATA drive would be elsewhere, I guess this confuses things?)
So I make a linux bootdisk and used a "configfile (hd1,0)" entry to boot to secondary HDD and it shows the grub boot menu, with options to boot OpenSUSE 10.3, so I know grub is installed on the MBR of the secondary disk. So why doesn't it boot when I ask it to?
Any ideas? I am absolutely clueless!
Thanks for your help and patience in advance
Tom
[EDIT]Just booted with UBCD "Boot second hard disk" and booted just FINE. For those of you that use this, the code it uses is this:
Quote:
#
# Boot from second hard disk
#
hddboot81:
if bootCheck[0x81]; then boot 0x81
clear
set textColor = color[brightred on black]
print "\n"
print "\acDrive is not bootable\n"
wait 0
Hi all, just bought a new PC with two HDD, one SATA, the other ATA. The ATA drive is the slave and has OpenSUSE 10.3 (Beta) installed, GRUB is also installed here. The master (SATA) has windwos XP installed nothing else.
[EDIT]
Here is a fix if you have a floppy drive.
Install Smart Boot Manager to a floppy and boot the Linux drive from the floppy. One other note this does not replace Grub. Grub or some bootloader must be installed on the Linux drive.
So I make a linux bootdisk and used a "configfile (hd1,0)" entry to boot to secondary HDD and it shows the grub boot menu, with options to boot OpenSUSE 10.3, so I know grub is installed on the MBR of the secondary disk. So why doesn't it boot when I ask it to?
From the time I spent with Grub, I found that he views hd0 as the device
that it was booted from, if that makes sense. So you need to reference
"configfile (hd0,0)" I think?
You might want to go into 'Command mode" of Grub and test this?
If you wanted to, your could setup your PC to boot Linux from your second HDD when you have a USB stick installed. You could use the 'Configfile' parm to redirect Grub to somewhere else, another HDD. I can help you with that if you want?
If during the initial SUSE installation, you installed grub to the first boot-able drive the bios looks at, I'm assuming it would be the SATA with Windows. As you mentioned you later replaced grub in the MBR of the SATA drive with the Windows boot loader, all the while, the bios is set to boot the SATA drive. Next you would need to install Grub to the MBR of the PATA drive. This would be done from a live CD or similar where you would get to a root terminal and issue the 4 commands below when the bios is set to boot the SATA drive:
Code:
grub
root (hd1,0)
setup (hd1)
quit
If the bios is set to boot the PATA drive when doing this, you would use the four commands below:
Code:
grub
root (hd0,0)
setup (hd0)
quit
If you do not have the option to set the bios to boot the second drive (Slave) on the IDE channel, switch it with the optical drive so the hard drive is Master on the end connector of the ATA cable, and the DVD is connected to the middle connector and jumpers set accordingly. You can set both drive's jumpers to CS (cable select) on more modern equipment.
If the computer came new with the second drive on the IDE channel, it should have an 80 wire cable. If it did not originally come with that drive, chances are the cable only has 40 wires, a 40 wire cable will have crosstalk causing errors, an 80 wire cable has 40 more wires shielding the 40 being used. Optical drives do not need the 80 wire, most computer manufacturers will only put a 40 wire on the IDE channel if it only has optical drives.
Bad link
Error 404
Page Not Found
Tue Aug 28 2007 2:24:23 am PDT
139.141.187.143 tried to load mt-umunhum-wireless.net/USB_Boot_using_GRUB.html
User Agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Yes you have been bagged and tagged
for a making an illegal move
In my opinion you'd save yourself a lot of time and trouble if you ditched the Windows NT loader and just used grub to boot both Windows and Linux. If you make Windows the default then the PC will automatically boot into Windows without any user input. Linux will only be accessible by selection using the up/down arrows on the keyboard from the grub menu at boot time.
Did your Windows/Linux configuration ever work before you applied fixmbr and deleted grub, ie were you initially able to boot Linux?
If it did, then your issue with two separate physical volumes was configured during the openSuse installation.
Although you said you want to boot XP without being prompted by grub, this really isn't possible since the MS prompt can't be used for linux effectively. However what you can do is to set Windows to be the default entry and limit the time that grub is displayed on the screen (like, say, 1 or 2 seconds).
First, check to see if you still have your menu.lst file. This should be located in /boot/grub. But obviously to do this you need access to your linux drive. You can make a "system rescue cd"--see http://www.sysresccd.org/Main_Page for more on that. Afterwards, boot from this CD, find out what your openSuse partition is, like /dev/(something), and then mount it and you should be able to see your files.
While you are there, find out what the exact name of your kernel and initrd files are, if you don't have menu.lst. These are in /boot --note you need your linux partition mounted first, and then find the /boot directory under your mounted partition. Otherwise cd'ing to /boot will give you the kernel information for the (linux) system rescue cd. The former might be named something like vmlinuz-[the number of your kernel] and the latter is named like initrd-[the number of your kernel]. Then, if you can get grub installed by cd or usb drive, and if you can get to the grub prompt, you can type this in. You will need to know what your root partition is called first. This is something like (hd0,1) but this would likely be different for you. Then you can type
kernel (your root, partition)/boot/vmlinuz-[some numbers] [a bunch of configuration options--type those if you still have menu.lst]
You may then be able to boot the kernel, but if you don't know the configuration options from menu.lst, then some things like suspend/resume won't work. If it boots, then inspect or re-create menu.lst.
default=1 // make Windows the default (0 would be openSuse)
timeout=2 //display grub for 2 seconds
title openSuse
root (your root, partition)
kernel (see above) [then a bunch of configuration stuff]
initrd (...)
title Windows XP Professional
rootnoverify(the root partition, of XP)
chainloader +1
But, depending on how experienced with openSuse you are, you may decide to reinstall it if you can't find the configuration options for your kernel. Reinstalling would automatically generate this and you could set up logical volume management for your hard drives. You could then append menu.lst and add a section for XP, set it as the default, and adjust the display time...
1. You concluded that GRUB must be installed on the second drive because booting with the floppy got the GRUB menu:
GRUB has 2 parts: one on the MBR and the rest in /boot/grub/ The menu is in /boot/grub and you will see that whenever you boot to that partition from anywhere.
3. I agree with Trickie. Or you can move your XP drive to the second (hd1) and use GRUB on the first (hd0) to chainload XP using "map (hd0) (hd1)" and "map (hd1) (hd0)" commands in the GRUB script to boot XP.
It really doesn't matter which operating system is where just as long as they are listed accurately in the grub menu.lst, and, as drakebasher says, Windows is chainloaded. In addition, grub must be installed to the MBR. The grub directory itself, including the stage 1, stage 1.5, and stage 2 files can also be anywhere you like.
I do wish that people would forget about floppy disks. I'd like to collect the world's supply and burn them. They never were reliable, and now there are far better alternatives.
I do wish that people would forget about floppy disks. I'd like to collect the world's supply and burn them. They never were reliable, and now there are far better alternatives.
I disagree.
I have never found a floppy unreliable in Linux. Neither have I found any Dos, Windows, Linux, BSD or Solaris that cannot be booted by a humble Grub floppy made in Linux or Solaris.
It gives a kick to fire up a Vista with it. So burn what you can as there is no way I would give it up mine. Compare with other bootable media a floppy is the most stable because in Linux it is also device "fd0".
For booting from a hard disk the 2.6.20 and newer kernel can name it any names from sda, sdb, sdc...... It all depends on how the hard disk is connected and how the booting queue is arranged in the Bios. The partition can be identified by Linux convention, by label (used by Red hat), by UUID (used by Ubuntu), by device model names etc.
For CD or DVD there are only two boot loaders in Linux; isolinux and Grub.
A USB device boots only if the Bios supports it.
Floppy enjoys the possibility of Grub, Lilo, Loadin and syslinux even we omit the third party stuff.
I think a brand new floppy disk drive can be picked up for as little of GBP 3 or US$ 6. It doesn't complete space with hard disk, requires next to nothing on electrical power and is still a great device in its own right.
Whenever I have a booting problem with booting from a hard disk it can always be resolved by a Grub prompt obtainable by inserting a Grub floppy.
Thanks for you help everyone, did some reading up on your replies and solved it! I can now turn pc on and it will boot windows with no windows or linux bootloader so prying hands can't mess up my linux distro, and to boot linux with a full colour GRUB bootloader all I need to do is hit F10 to choose boot menu at start and choose my other HD, no time plugging in USB floppy drives and using 10 year old rubbish floppies to boot my system.
It seemed to me that I could only solve this problem by actually checking what was on the MBR of the PATA (sda) so I found a thread that told me to:
The fact that it says "GRUB hard disk read error" in part of the code shows it has this message stored in the code to it must be a GRUB bootloader. So why couldn't I access it? Must be a boot flag issue, so reapply flag by the following:
Code:
sudo fdisk /dev/hda
a
1
w
q
And it boots fine. Just needed to change my menu.lst bits that point to root(hd1,0) to be (hd0,0) as mentioned and its fine!
Fortunately it is a fairly recent HD and has an 80 pin cable so the hardware set up appears fine, even as a slave to the ODD.
What I don't understand is that when I booted from the linux boot floppy (which I add I REALLY needed when I found I had the wrong HD info in the menu.lst file) it could access the menu.lst file because it could find it on my PATA disk, but how did it boot it? At the time I made my disk my menu.lst file was pointing to hd1,0, but grub needs the hd it boots from to be called hd0,0 --so how did it boot up? Something to do with the floppy being used in place of the HD? The only reason I could explain it is that to GRUB when I boot off a floppy, my PATA disk would be hd1,0 because the floppy is hd0,0 but wouldn't that be fd0? Glad to solve it but would really like to know how the floppy disk boots with the old menu file?
Thanks everyone, your help has been greatly appreciated!
The GRUB MBR points to the location of the boot files, including the menu.lst. If your boot floppy was setup with root (GRUB's root, not your OS root) on (hd1), then you would see the menu.lst from (hd1). Where the GRUB MBR points is determined when GRUB is installed, either to a floppy or to a hard drive partition.
The designation of (hd1) vs. (hd0) is determined by which drive GRUB "sees" first. If you had GRUB installed on two identical drives, whichever one you boot to (through the BIOS settings) would be (hd0) and the other would be (hd1). That has nothing to do with which is /dev/hda or /dev/hdb: that is determined by physical wiring.
Bad link
Error 404
Page Not Found
Tue Aug 28 2007 2:24:23 am PDT
139.141.187.143 tried to load mt-umunhum-wireless.net/USB_Boot_using_GRUB.html
User Agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Yes you have been bagged and tagged
for a making an illegal move
I too have same setup. One SATA hardisk (sda) and one PATA harddisk (hdb). I too had the same problem. After lot of researching/efforts I found that BIOS is required to inform which harddisk to boot from. My BIOS has that option. If one wants to boot from SATA, make it first boot drive and if from PATA, make it first boot drive. That way I solved my problem.
Alternatively same GRUB can be installed on both the drives. In that case GRUB menu.lst file on each drive has to be edited.
If you want to boot GRUB from SATA drive, all partitions on SATA drive will be referred as (hd0,x) where x is the number of partition on PATA. Similarly all references to PATA will have to be edited as (hd1,x) as it becomes second drive.
If you want to boot GRUB from PATA drive, all partitions on PATA drive will be referred as (hd0,x) where x is the number of partition on SATA. Similarly all references to SATA will have to be edited as (hd1,x) as it becomes second drive.
While editing the menu.lst file default operating system to be booted can be changed on each drive.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.