You are not logged in.

#1 2006-03-21 21:01:06

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

SATA and GRUB? Is it possible? [solved]

Hi all

I suppose that is it possible to install GRUB on SATA disk.
I have the following problem:

I have these partitions:

sda1 - NTFS - win
sda2 - actually without filesystem
sda3 - boot linux ext2
sda5 - linux swap
sda6 - linux XFS

I would like to use GRUB as bootloader so I write the following to the menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,5)
kernel /boot/vmlinuz26 root=/dev/sda6 ro vga=773
initrd /boot/initrd26.img

But I always get error 22 from GRUB. I suppose the I make mistake at the root line, because I currently dont know if there should be the boot or the root particion, but if the root then it should be right.
Next I install GRUB do boot partition, so to: sda3

I can install LILO correctly, but I wouldn't like to use LILO, I would rather to learn GRUB so can me anyone help where I make the mistake?
(and the primary or logical partitions are not playing the game there, or yes?)

Offline

#2 2006-03-21 21:54:23

Infinite
Member
From: .nl
Registered: 2006-03-04
Posts: 35

Re: SATA and GRUB? Is it possible? [solved]

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda6 ro vga=773
initrd /initrd26.img


I think you're trying to boot into your swap partition if your partition table corresponds with what you've posted above.

This could also be of some help:
http://wiki.archlinux.org/index.php/GRUB

Where is sda4 btw ??

edit: made a mistake  :oops:  (fixed)

Offline

#3 2006-03-21 22:01:12

syd
Member
From: Auckland, NZ
Registered: 2006-01-22
Posts: 155

Re: SATA and GRUB? Is it possible? [solved]

Hey this is what the grub manual say about error 22

22 : No such partition
    This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.

So id say that your trying to boot a partition thats not there. Boot to a liveCD and cheak out your partitions with  `fdisk /dev/sda -ls`.

Offline

#4 2006-03-22 11:33:57

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

infinite: I dont know if you understand me. The sda3 is the - boot partition, sda6 is then the system partition where I would like to install Arch.

Syd: thanks I will try it, actually I'm at the school so when I will be at home I will try it.

Offline

#5 2006-03-22 12:00:51

tyme
Member
From: PA
Registered: 2003-06-12
Posts: 139
Website

Re: SATA and GRUB? Is it possible? [solved]

Infinite wrote:

Where is sda4 btw ??

sda4 would be the extended partition. as you can only have 4 primary partitions, the 4th needs to be an extended partition in the event that you want more than 4 partitions on your drive.

I suppose the I make mistake at the root line, because I currently dont know if there should be the boot or the root particion, but if the root then it should be right.

the root line needs to point to the partition that contains the kernel image.  try this:

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda6 ro vga=773
initrd /initrd26.img

alternatively, you may need to use this kernel line:

kernel /vmlinuz26 real_root=/dev/sda6 ro vga=773

note the use of "real_root" instead of just "root".  From what I understand, this option is sometimes necessary when the root here is different from the one given in the root() line.

Offline

#6 2006-03-22 12:02:46

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: SATA and GRUB? Is it possible? [solved]

Infinite wrote:

# (0) Arch Linux
title Arch Linux
root (hd0,4)
kernel /boot/vmlinuz26 root=/dev/sda6 ro vga=773
initrd /boot/initrd26.img


I think you're trying to boot into your swap partition if your partition table corresponds with what you've posted above.

I believe thre root-line should be "root (hd0,4)" if your Arch installation resides on sda3. (GRUB starts with 0 and counts onward )

No! Then it should be (hd0,2)!

You have a separate boot partition, but your GRUB menu entry acts as if you don't. try this:

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda6 ro vga=773
initrd /initrd26.img

Note that I dropped the /boot/ from the kernel and initrd lines. This is because root (hd0,2) accesses your boot partition directly so it becomes / (instead of /boot).

when you try to access /boot like that, you actually access the /boot folder on sda6, but this is empty, because your boot partition isn't mounted there, at that point in the boot process.

GRUB has no notion of /etc/fstab wink


You like cheese? You like peas? You'll love cheezy peas!

Offline

#7 2006-03-22 12:08:34

tyme
Member
From: PA
Registered: 2003-06-12
Posts: 139
Website

Re: SATA and GRUB? Is it possible? [solved]

bwahaha!  i'm 2 minutes faster tongue

Offline

#8 2006-03-22 12:09:38

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: SATA and GRUB? Is it possible? [solved]

bah tongue


You like cheese? You like peas? You'll love cheezy peas!

Offline

#9 2006-03-22 15:10:53

Infinite
Member
From: .nl
Registered: 2006-03-04
Posts: 35

Re: SATA and GRUB? Is it possible? [solved]

Sander wrote:

No! Then it should be (hd0,2)!

You have a separate boot partition, but your GRUB menu entry acts as if you don't. try this:

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda6 ro vga=773
initrd /initrd26.img

Note that I dropped the /boot/ from the kernel and initrd lines. This is because root (hd0,2) accesses your boot partition directly so it becomes / (instead of /boot).

woops :oops:
It was late at the time  (It was already past midnight, 2 AM I believe) 8)

I can't believe I've made such a stupid mistake: :?
sda1 = 0
sda2 = 1
sda3 = 2   

Ah well, I'm human after all  tongue

Offline

#10 2006-03-22 15:18:23

Infinite
Member
From: .nl
Registered: 2006-03-04
Posts: 35

Re: SATA and GRUB? Is it possible? [solved]

tyme wrote:

sda4 would be the extended partition. as you can only have 4 primary partitions, the 4th needs to be an extended partition in the event that you want more than 4 partitions on your drive.

Ahh, yeah of course.  8)  thanks.

Offline

#11 2006-03-22 20:34:39

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

Sander wrote:

You have a separate boot partition, but your GRUB menu entry acts as if you don't. try this:

# (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz26 root=/dev/sda6 ro vga=773
initrd /initrd26.img

Hi. I have just tried this, but still the same I get firt error 22 then error 12 from GRUB. I tried many combinations but I really dont know what to do.

Yes sda4 is extended. sda5 and 6 are logical partitions and the other are primary.

Offline

#12 2006-03-22 21:17:35

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: SATA and GRUB? Is it possible? [solved]

depi what does grub answer when you use auto completion at boot time ?
like :
root (hd0,[TAB])
then :
kernel /[TAB_until_you_find_the_right_boot_directory]/vmlinuz26 root=/dev/sda[There_you_have_to_know_on_which_partition_is_your_kernel!]


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#13 2006-03-22 22:06:03

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

kozaki wrote:

depi what does grub answer when you use auto completion at boot time ?
like :
root (hd0,[TAB])
then :
kernel /[TAB_until_you_find_the_right_boot_directory]/vmlinuz26 root=/dev/sda[There_you_have_to_know_on_which_partition_is_your_kernel!]

Hi what boottime? I just stuck at GRUB installation so the GRUB is not installed at all.

Offline

#14 2006-03-23 00:20:00

tyme
Member
From: PA
Registered: 2003-06-12
Posts: 139
Website

Re: SATA and GRUB? Is it possible? [solved]

please post your entire menu.lst and the exact command you're using to install grub.  it may be that you're telling it to install grub somewhere that it can't find.

Offline

#15 2006-03-23 08:07:49

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: SATA and GRUB? Is it possible? [solved]

Also, is that SATA disk the only one you have, or do you have multiple? There might be a difference in how emulated grub / grub-install and the real grub order your disks. This is especially the case if you have both SATA and IDE disks.


You like cheese? You like peas? You'll love cheezy peas!

Offline

#16 2006-03-23 16:07:01

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

Sander wrote:

Also, is that SATA disk the only one you have, or do you have multiple? There might be a difference in how emulated grub / grub-install and the real grub order your disks. This is especially the case if you have both SATA and IDE disks.

Hi. Yesterday I play with it a little bit and I realised that the problem was with the plugged second IDE disk. So when I plugged it out, then the GRUB installs ok, but when I plugged it back then I the GRUB not loaded.
So what I can do? How is the SATA disk represented in the GRUB installation when they are both - SATA and IDE connected?

Offline

#17 2006-03-23 16:22:33

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: SATA and GRUB? Is it possible? [solved]

So, grub boots when you remove your IDE disk. You installed GRUB to /dev/sda, right? In that case, I think your BIOS tries to boot from teh IDE disk, while the bootloader is clearly on the SATA disk. Try changing the harddisk boot order in the BIOS, if you can. If you can't, you could always install GRUB to /dev/hda, even though the rest of its files are on /dev/sda. This shouldn't be a problem.


You like cheese? You like peas? You'll love cheezy peas!

Offline

#18 2006-03-23 16:24:15

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

Sander wrote:

So, grub boots when you remove your IDE disk. You installed GRUB to /dev/sda, right? In that case, I think your BIOS tries to boot from teh IDE disk, while the bootloader is clearly on the SATA disk. Try changing the harddisk boot order in the BIOS, if you can. If you can't, you could always install GRUB to /dev/hda, even though the rest of its files are on /dev/sda. This shouldn't be a problem.

Yes. It is possible that it tries to boot from that IDE disk, I've forgot to check it. So I go and try it, thanks very much, I hope now it will be okay.

Offline

#19 2006-03-23 20:31:39

depi
Member
From: EU - Slovakia
Registered: 2005-12-07
Posts: 39
Website

Re: SATA and GRUB? Is it possible? [solved]

Okay the problem is solved! Thanks!

Offline

#20 2006-03-24 08:15:22

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: SATA and GRUB? Is it possible? [solved]

Good to hear. Maybe you should edit the title of the topic to include [SOLVED].


You like cheese? You like peas? You'll love cheezy peas!

Offline

Board footer

Powered by FluxBB