You are not logged in.

#1 2009-10-29 21:59:20

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Grub cannot find file" for Arch64 on ext4

My laptop is 64-bit. Originally (a yearish ago) when I got it I needed a functional laptop badly and didn't want to investigate to see if Arch-64 was stable enough for me, I'd heard the chipset wasn't fully 64-bit compatible, etc. I didn't want to deal with it at that moment, so I just installed Arch-32 and figured I'd investigate 64-bit later. Well, now is "later" and I'm trying to migrate to Arch64.

My plan was to install Arch64 to another partition and use it alongside Arch32 while I moved over data, installed packages, etc, as I had time, and then I would remove Arch32 when I was completely done.

I installed Arch64 but I can't boot to it using Grub. I'm using the Grub version that came with Arch32, I didn't re-install it from the Arch64 install disk. I created an entry for Arch64 in Grub, but when I boot to it I get an error saying that "file not found". I don't know which file isn't found, I just know that it's not found.

I'm using ext4 for my Arch64 partition. On my desktop I have Arch64 on ext4 with no problems, so I'm confused.

Here's my Grub entry:

# Arch Linux (ext4)
title (hd0,4): Arch Linux (ext4)
root (hd0,4)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/3da80ff7-1ac5-428d-a5ce-8e538f3e6b90 ro
initrd /boot/kernel26.img

My partitions:
sda1 -> Grub
sda2 -> Arch32
sda3 -> Windows 7 RC
sda4 -> Extended partition
sda5 -> Arch64

My guess is that this has something to do with 64-bit, ext4, or the fact it's on an extended partition, but I've done all of those with other OS's without any problems.

Any help would be appreciated.

Offline

#2 2009-10-29 22:28:24

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Grub cannot find file" for Arch64 on ext4

64-bit or not shouldn't be making a difference here.  My guess would be that your GRUB is too old, and doesn't have ext4 support.  Boot to a working arch installation, make sure GRUB is up to date, then as root:

# grub
grub> root (hd0,X) # X is the partition containing /boot/grub/stage1 (or /grub/stage1 if you have a separate boot partition)
grub> find /boot/grub/stage1 # Make sure it can find stage1 (find /grub/stage1 if you have a separate boot partition)
grub> setup (hd0)
grub> quit

See http://wiki.archlinux.org/index.php/GRU … oot_Record

Offline

#3 2009-10-29 23:04:02

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: Grub cannot find file" for Arch64 on ext4

sda1 -> Grub

Is that a typo, or do you really have a partition dedicated to grub? What is in it - the content of /boot/grub?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#4 2009-11-02 04:28:33

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Grub cannot find file" for Arch64 on ext4

tavianator wrote:

64-bit or not shouldn't be making a difference here.  My guess would be that your GRUB is too old, and doesn't have ext4 support.  Boot to a working arch installation, make sure GRUB is up to date, then as root:

# grub
grub> root (hd0,X) # X is the partition containing /boot/grub/stage1 (or /grub/stage1 if you have a separate boot partition)
grub> find /boot/grub/stage1 # Make sure it can find stage1 (find /grub/stage1 if you have a separate boot partition)
grub> setup (hd0)
grub> quit

See http://wiki.archlinux.org/index.php/GRU … oot_Record

I have the latest version of the Grub package from [core] installed and I used it to install Grub to the disk. Should that not be sufficient?


grey wrote:

sda1 -> Grub

Is that a typo, or do you really have a partition dedicated to grub? What is in it - the content of /boot/grub?

Yes, that's what it is. Since I've installed/moved several partitions around over time, I grew weary of having one install be the one to house Grub files. I didn't want to separate /boot, because I wanted each install to have it's own /boot. Splitting of Grub seemed like the logical decision at the time, although now it doesn't really apply to me any more.

Offline

#5 2009-11-03 05:15:46

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Grub cannot find file" for Arch64 on ext4

I tried booting to the Arch LiveCD and using it to reinstall Grub, but to no avail.

The problem was solved by just re-installing Arch and using the installer's option to install a bootloader. The newly installed Grub boots everything as it should.

I'm not marking the thread as "solved" yet, though, because I'm not satisfied as to why my initial attempts proved unsuccessful. I had the latest version of .9x Grub availible from the repositories and I could not get it to boot the new 64-bit partition. Forget the sda1->Grub complication, to eliminate complexity I wound up eliminating that and just using /boot/grub relative to each relevent partition.

I installed and then setup the latest version of Grub many times in many ways and it didn't work. The Arch install CD didn't help unless I used the installer's final stage to do the installation, then it works perfectly. What gives?

Offline

#6 2009-11-03 19:12:46

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: Grub cannot find file" for Arch64 on ext4

Grub boots from separate partition that is mounted as /boot, hence you don't need /boot in your path to the vmlinuz and kernel.img. That is why you get file not found, because grub looks for boot dir, which could not be located. You just had to remove boot (/boot/kernel.img becomes /kernel.img). That was your problem.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#7 2009-11-03 19:18:17

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Grub cannot find file" for Arch64 on ext4

Dheart wrote:

Grub boots from separate partition that is mounted as /boot, hence you don't need /boot in your path to the vmlinuz and kernel.img. That is why you get file not found, because grub looks for boot dir, which could not be located. You just had to remove boot (/boot/kernel.img becomes /kernel.img). That was your problem.

I'm not so sure.  Seems like the OP had a separate /boot/grub partition, but /boot for Arch64 was on /dev/sda5.

Offline

#8 2009-11-03 19:23:01

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Grub cannot find file" for Arch64 on ext4

and probably remove the "root (hd0,4)" line? post the entire grub config

Last edited by vacant (2009-11-03 19:24:27)

Offline

#9 2009-11-03 20:39:27

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: Grub cannot find file" for Arch64 on ext4

tavianator wrote:
Dheart wrote:

Grub boots from separate partition that is mounted as /boot, hence you don't need /boot in your path to the vmlinuz and kernel.img. That is why you get file not found, because grub looks for boot dir, which could not be located. You just had to remove boot (/boot/kernel.img becomes /kernel.img). That was your problem.

I'm not so sure.  Seems like the OP had a separate /boot/grub partition, but /boot for Arch64 was on /dev/sda5.

So he had a /boot partition for arch32 and a /boot/grub for arch64? He should really post his entire grub.conf.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#10 2009-11-03 21:57:00

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Grub cannot find file" for Arch64 on ext4

Dheart: no, I think the OP has a /boot/grub partition common to every linux installation, but each installation had its own /boot, not on a separate partition.  As in /dev/sda1 is mounted at /boot/grub on every installation, but /dev/sda2 and /dev/sda5 have separate /boot directories that are not their own partition.

Offline

#11 2009-11-03 22:05:42

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Grub cannot find file" for Arch64 on ext4

I apologize for the confusion, here's what I had:

sda1: /boot/grub
-> I originally used this, but I removed it once things got complicated. It did not play a factor after my first one or two attempts.

sda2: /boot
-> Arch32 had its own /boot and it's own Grub installation

sda5: /boot
-> Arch64 had its own /boot and it's own Grub installation

After I eliminated sda1 from the equation, I ensured that the package grub was up-to-date on sda2 and re-installed Grub. I still couldn't get it to work. Frustrated, I booted to the Arch LiveCD and installed the Grub package for Arch64 (using pacman with --dbpath) and used Grub to install from that, which didn't work. I then re-installed Arch64 and used the installer's final set to install the bootloader, it works fine now.

I'd post my old Grub menu, but I've since removed my Arch32 partition and don't have it any longer.

Where do the /boot/grub/{stage1,stage2,*stage1_5} files come from? They are not included in the pacman -Ql grub listing and when I installed grub on Arch64 from the LiveCD, I had to manually copy the stage1, etc files to /boot/grub from /usr/lib/grub/i386-pc.

Offline

#12 2009-11-03 22:08:54

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Grub cannot find file" for Arch64 on ext4

tavianator wrote:

Dheart: no, I think the OP has a /boot/grub partition common to every linux installation, but each installation had its own /boot, not on a separate partition.  As in /dev/sda1 is mounted at /boot/grub on every installation, but /dev/sda2 and /dev/sda5 have separate /boot directories that are not their own partition.

That was the motivation behind why I put grub on /dev/sda1 in the beginning, yes. But in the interest of minimal complexity I gave each partition it's own /boot and /boot/grub throughout this process. After my failed attempt to boot into Arch64 for the first time, the first thing I did was copy the sda1's grub folder to sda2's /boot/grub, reinstall from sda2, and then proceed trying to get the sda2 Grub install to boot Arch64. This is where I ran into problems.

Offline

#13 2009-11-04 02:24:06

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Grub cannot find file" for Arch64 on ext4

I'm an avid multi-booter and I think you were ever so near it, just didn't quite get the 'hang' of it ...
My partitioning scheme is as follows:
sda1 - 32M (ext2) - only gets mounted when I need to update /dev/sda1/grub/menu.lst
sda2 - swap
sda3 - 20 gigs - 1st linux distro   # personally I like reiserfs, but each to his or her own
sda5 - 20 gigs - 2nd linux distro
sda6 - 20 gigs - 3rd linux distro
.
.
sdaX - remainder (mostly xfs because centos/redhat is so picky) - common 'work' area for all linuces, mounted as /disk

Now I use a live-cd (anyone will do) to install grub on the mbr - it goes something like this ...

fdisk /dev/sda  # partition as indicated above
mkfs -t ext2 /dev/sda1
mkdir  /mnt/boot
mount -t ext2 /dev/sda1 /mnt/boot
mkdir /mnt/boot/grub
cp /usr/lib/grub/i386-pc/* /mnt/boot/grub
grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
echo <<EOF >/mnt/boot/grub/menu.lst
default 0
timeout 10
title archlinux
  root (hd0,2)  # ie /dev/sda3
  chainloader +1
title linux mint
  root (hd0,4)  # ie /dev/sda5
  chainloader +1
title centos-5
  root (hd0,5)  # ie /dev/sda6
  chainloader +1
EOF

Whenever I install a new distro, I just give it the partition to work on and nothing else (I can always come back and tidy up /etc/fstab)
I also select to install grub on the root filesystem partition.

This way - /dev/sda1 is never mounted unless I need to make changes to menu.lst - it is only used for grub to chainload to another grub, and any update on  any distro will happily update their own menu.lst and never bother about anyone or anything else.

The only reason I do not have a common /home partition is that /home/$USER gets polluted with all the different dot-files - and they may be different for different distros - hence the  'work-area' common to all distros as the last partition.
If I want room for yet another distro that I didn't anticipate from the beginning - well, I can always back up my work-area to some external disk (he he involontary backup!) and use fdisk to split up that partition further ...

Last edited by perbh (2009-11-04 02:33:37)

Offline

Board footer

Powered by FluxBB