# Boot: Can't find vmlinux symlink

## lyallp

I have an Intel 32 bit Gentoo system.

```
Linux pearcely 2.6.36-gentoo-r8 #1 SMP PREEMPT Mon Apr 4 10:50:12 CST 2011 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux
```

 which, upon boot, cannot seem to find '/boot/vmlinuz'.

However, it is quite happy to find the full '/boot/vmlinuz-2.6.36-gentoo-r8' file.

The Filesystem is XFS.

This problem has been around for quite some time and I have finally decided to try do something about it.

I am hoping someone can enlighten me as to the error of my ways.

I have other gentoo systems which work just fine, both 32 and 64 bit.

The /boot partition looks like this

```
  /boot:

  total used in directory 18M available 236296

  drwxr-xr-x  3 root root 4.0K Apr  4 13:03 .

  drwxr-xr-x 22 root root 4.0K Oct 30 03:10 ..

  lrwxrwxrwx  1 root root    1 Jan  7  2010 boot -> .

  lrwxrwxrwx  1 root root   23 Apr  4 10:51 config -> config-2.6.36-gentoo-r8

  -rw-r--r--  1 root root  75K Jan 18 16:33 config-2.6.35-gentoo-r15

  -rw-r--r--  1 root root  75K Jan 18 16:06 config-2.6.35-gentoo-r15.old

  -rw-r--r--  1 root root  75K Apr  4 10:51 config-2.6.36-gentoo-r8

  lrwxrwxrwx  1 root root   24 Jan 18 16:33 config.old -> config-2.6.35-gentoo-r15

  drwxr-xr-x  2 root root 4.0K Apr  4 13:14 grub

  -rw-r--r--  1 root root    0 Feb  7 19:20 .keep

  lrwxrwxrwx  1 root root   27 Apr  4 10:51 System.map -> System.map-2.6.36-gentoo-r8

  -rw-r--r--  1 root root 1.7M Jan 18 16:33 System.map-2.6.35-gentoo-r15

  -rw-r--r--  1 root root 1.7M Jan 18 16:06 System.map-2.6.35-gentoo-r15.old

  -rw-r--r--  1 root root 1.7M Apr  4 10:51 System.map-2.6.36-gentoo-r8

  lrwxrwxrwx  1 root root   28 Jan 18 16:33 System.map.old -> System.map-2.6.35-gentoo-r15

  lrwxrwxrwx  1 root root   24 Apr  4 10:51 vmlinuz -> vmlinuz-2.6.36-gentoo-r8

  -rw-r--r--  1 root root 4.1M Jan 18 16:33 vmlinuz-2.6.35-gentoo-r15

  -rw-r--r--  1 root root 4.1M Jan 18 16:06 vmlinuz-2.6.35-gentoo-r15.old

  -rw-r--r--  1 root root 4.1M Apr  4 10:51 vmlinuz-2.6.36-gentoo-r8

  lrwxrwxrwx  1 root root   25 Jan 18 16:33 vmlinuz.old -> vmlinuz-2.6.35-gentoo-r15

```

The grub.conf looks like this

```

# NOTE: Using 3rd entry by default

default 2

timeout 15

#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# Doesn't work - can't find vmlinuz

title Gentoo Linux

root (hd0,1)

kernel /boot/vmlinuz root=/dev/sda1 video=uvesafb:1280x1024-16@60,mtrr:3,ywrap fbcon=scrollback:64K vmalloc=192M

# Doesn't work - can't find vmlinuz

title Gentoo Linux - previous version

root (hd0,1)

kernel /boot/vmlinuz.old root=/dev/sda1 video=uvesafb:1280x1024-16@60,mtrr:3,ywrap fbcon=scrollback:64K vmalloc=192M

# Default entry - at this time, seem to be having problems using the 'symlink' to current version.

title Gentoo Linux (2.6.36-gentoo-r8) 1280x1024-16@60

root (hd0,1)

kernel /boot/vmlinuz-2.6.36-gentoo-r8 root=/dev/sda1 video=uvesafb:1280x1024-16@60,mtrr:3,ywrap fbcon=scrollback:64K vmalloc=192M

 

title Gentoo Linux (2.6.35-gentoo-r15) 1280x1024-32@60

root (hd0,1)

kernel /boot/vmlinuz-2.6.35-gentoo-r15 root=/dev/sda1 video=uvesafb:1280x1024-32@60,mtrr:3,ywrap fbcon=scrollback:64K vmalloc=192M

 

title Gentoo Linux (2.6.35-gentoo-r15)

root (hd0,1)

kernel /boot/vmlinuz-2.6.35-gentoo-r15 root=/dev/sda1 vmalloc=192M

```

Grub device.map looks like this

```
(hd0)   /dev/sda

```

I am using grub-0.97-r10

```
[I] sys-boot/grub

     Available versions:  0.92-r1 0.94-r1 0.96-r1 0.96-r2 ~0.96-r3 ~0.97 0.97-r2 0.97-r3 0.97-r4 0.97-r5 0.97-r6 ~0.97-r8 0.97-r9 0.97-r10 **1.98 **1.99_rc1 **9999 {custom-cflags debug device-mapper multislot ncurses netboot sdl static truetype}

     Installed versions:  0.97-r10(19:20:03 07/02/11)(ncurses -custom-cflags -netboot -static)

     Homepage:            http://www.gnu.org/software/grub/

     Description:         GNU GRUB boot loader

```

File system layout is as follow :-

```
root@pearcely:~

# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda1             262M   91M  172M  35% /

udev                   10M  244K  9.8M   3% /dev

/dev/sda2             263M   32M  231M  12% /boot

/dev/mapper/vg-usr    8.0G  5.3G  2.8G  66% /usr

/dev/mapper/vg-usr_local

                     1014M  570M  445M  57% /usr/local

/dev/mapper/vg-tmp     10G   57M   10G   1% /tmp

/dev/mapper/vg-var   1014M  525M  490M  52% /var

/dev/mapper/vg-opt    5.0G  2.5G  2.6G  50% /opt

/dev/mapper/vg-portage

                      6.0G  6.0G   44M 100% /portage

/dev/mapper/vg-home   5.0G  4.6G  497M  91% /home

/dev/mapper/vg-vms    128G  112G   17G  88% /vms

/dev/mapper/vg-public

                       60G   31G   30G  51% /public

shm                   1.7G     0  1.7G   0% /dev/shm

```

Partition layout as follows :-

```
root@pearcely:~

# fdisk -l /dev/sda 

Disk /dev/sda: 250.0 GB, 250000000000 bytes

255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000a174f

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1              63      546209      273073+  83  Linux

/dev/sda2          546210     1092419      273105   83  Linux

/dev/sda3         1092420     9494414     4200997+  82  Linux swap / Solaris

/dev/sda4         9494415   488279609   239392597+  8e  Linux LVM

```

----------

## Wormo

Couldn't find anything like this reported yet

http://savannah.gnu.org/bugs/?group=grub

but on the other hand, broken symlink support for xfs is not the first thing most people will notice, since most use ext3 or ext4 for boot.

Even those who use xfs may not be using symlinks, since /boot/vmlinuz and /boot/vmlinuz.old symlinks are kind of old-school  :Wink: 

So, I think you're the victim of a seldom-encountered grub bug, rather than there being an error in your methods. At least you've got a workaround, since this bug is not likely to be real high on the list of most grub devs. Of course you're free to report it on that bug tracker mentioned above, in case they do have an xfs expert on the team.

----------

## lyallp

Curious you should think the links are old-school.

They are created by the linux kernel makefiles upon execution of 'make install'.

And, as I noted, I have exactly the same configuration on other machines but the symlinks work.

I figured I must have stuffed up a kernel config or something, on this particular machine.

----------

## gentoo_ram

I use symlinks on my /boot partition just fine.  But I'm using ext2 for /boot.  

I don't have /boot mounted at all unless I'm installing a new kernel.  Then after I modify /boot, I dismount it immediately.  No reason to have any filesystem other than ext2 for /boot as far as I'm concerned.

----------

## lyallp

Regarding not mounting /boot, I can understand that, security, etc, etc.

However, being lazy, I simply let /boot auto-mount and stay mounted, that way, I don't have to mount it when I update the kernel or grub.

With regards to ext2, well, I have XFS linked into my kernel, I use it all through my system, I have ext2 as a module so I can read an ext2/3 system if required, but ext2 doesn't get loaded because I never see ext2, so, in my case, the reverse is true, no need for ext2.

I have the additional benefit of a transactional FS on a key filesystem - if the /boot doesn't work, the system doesn't work. Been there, done that!   :Smile: 

----------

## Wormo

 *lyallp wrote:*   

> Curious you should think the links are old-school.
> 
> They are created by the linux kernel makefiles upon execution of 'make install'.
> 
> 

 

In my book running 'make install' is old school  :Wink: 

Most distros have kernels packaged up and auto-generated grub config entries all include the version strings.

Not saying old-school is bad, mind you... just that if you look at 9 out of 10 common Linux distros you won't find those links anymore (debian, ubuntu, fedora, SuSE, RHEL, etc etc) so grub symlink support might not be so well tested.

P.S. I copy my kernel in manually when running gentoo, so I'm old-school too

 *lyallp wrote:*   

> 
> 
> And, as I noted, I have exactly the same configuration on other machines but the symlinks work.
> 
> I figured I must have stuffed up a kernel config or something, on this particular machine.

 

Now this I don't understand -- thought maybe your other boxes weren't using XFS. 

Even so, the only suspects are grub or a filesystem error in your /boot -- grub does not depend on your kernel to parse filesystems, so how could kernel config affect it? I guessed grub XFS is having the problem because you can access the symlink just fine while booted to linux, pretty much ruling out filesystem errors.

* Exact same version of grub on the working x86 box? (amd64 could easily be different)

* Built grub with exactly the same toolchain?

* Does it behave the same with both grub2 and legacy grub?

----------

## lyallp

Old school: again curious, because the whole symlink scenario is built by kernel make. I use gentoo, I don't use other distro's, or haven't, for years, so using comparisons of those with me are like water off a ducks back. You are even older school than I, at least I use the tools provided to install the kernel, rather than simply copying.  :Smile: 

Using the symlink scenario, the grub.conf does not need to be modified when installing new kernels. Simplifies installation and reduces the probability of error. IMHO a much better way than specifically mentioning kernel versions in the grub.conf, like I have to do now on the problematic system.

Boot Issue: basically, I have 3 different boxes, 2 32 bit systems and one 64 bit system. The whole 'old-school' method works on 1 32 bit and the 64 bit system.

The 64 bit system is much newer, with a much more complicated startup, due to having encrypted disk partitions with LVM inside, with the only unencrypted partition being /boot.

The other 32 bit system is a little more complicated than the problematic one, as I have software raid on all linux partitions, with a corresponding problem with Windows dual booting, as described in this thread.

I have even re-installed grub and re-ran grub-install, on the problematic machine, to no avail - I have a fully up to date x86 system, with very few ~ packages.

Grub has probably been built with different toolchains, the two 32 bit systems are different in age. Both are 2 or more years since their initial creation. (can't say that for other distro's).

I don't use grub2, because I simply install standard grub, what package has grub2?

----------

## Goverp

FWIW, and it's not much, I found the symlinks didn't work using Grub to boot from a JFS partition, but they did with the partition changed to ext4. I assumed it was a restriction on Grub's ability to handle different file systems' directory structures, so I'm not surprised if it doesn't work on XFS.

The start of this thread says you have other Gentoo systems where it works.  Do they also use XFS for their boot partition?

----------

## lyallp

Yep, I am typing this message on the Gentoo system that uses grub with symlinks in /boot with an XFS filesystem.

I have used nothing but XFS for years now.

Life is so much easier being able to use the symlinks to the most recent and previous kernels.

----------

