# Possible Daft Question

## Graymi

It occured to me that becuase i don't use a separate boot partition (just a sub-directory off the root) it might be possible to create symbolic/hard links to the kernel in the /usr/src/linux/arch/x86_64/boot/ folder, instead of copying the whole thing each time. The obvious benefit being i don't have to remeber to copy the whole damn thing after each recompile. (i tend to go thru phases where i'll recompile it a couple of dozen times in a row)

What i want to know is a) is there any reason i really shouldn't do this and b) if not, symbolic or hard link?? i'm noobish enough not to really know which choice to make myself

----------

## Sadako

I never considered this myself, but can't see any reason why it wouldn't work.

Just make sure you have a livecd handy when you try it.  :Wink: 

Grub should be able to handle (soft) symlinks just fine, as that's what it uses with grub.conf (it actually uses something lke menu.lst, which is a symlink to grub.conf).

A hard link would actually point to the physical location of the kernel on the disc, meaning you'd still need to change it per each kernel upgrade.

That could actually have it's uses too, but a soft link is probably what you want.

Just make sure that the "symlink" USE flag is unset, in fact I'd strongly recommend adding "-symlink" to /etc/make.conf, otherwise a reboot after a new kernel emerge whithout building it will mean the symlink won't be pointing to anything.

As an alternative to creating the symlink in /boot, you could try just specifying the full path to the kernel within /usr/src/linux in your grub.conf.

Please post back if you try this, you've got me curious now.

----------

## pappy_mcfae

As far as I know, the file systems have to be completely booted for links to work. Links are the cause of the ubiquitous grub error 15. Sorry, got to work on those memory skills.  :Smile: 

Blessed be!

Pappy

----------

## baeksu

Of course, if you use 'make install' when building your kernel, it will copy the image to /boot and move the old image to a backup. This way you won't need to remember to change your grub settings.

----------

## cyrillic

 *Graymi wrote:*   

> It occured to me that becuase i don't use a separate boot partition (just a sub-directory off the root) it might be possible to create symbolic/hard links to the kernel in the /usr/src/linux/arch/x86_64/boot/ folder, instead of copying the whole thing each time. 

 

Actually it is even easier than that.  Just put this line in your grub.conf

```
kernel /usr/src/linux/arch/x86/boot/bzImage root=/dev/whatever ... 
```

And yes, the path is arch/x86/boot for 64bit kernels as well as 32bit kernels (unless you are still using an ancient kernel version).

----------

## Graymi

wow, totally forgotten i'd posted this, and only just found the reminder whilst trawling through old emails

never considered just pointing the link straight at the actual build directory, which i guess would have advantages in such as a new kernel version would still work (wouldn't have to repoint the symlink once i'd updated the usr/src/linux symlink)

thanks for your info.

and btw, cyrillic, i'm deifnately using x86_64, I tend not to update my kernel as the old one works fine, and updating it means i have to remeber all the various non built in modules which i have to recompile, tho for curisoities sake i'd be interested to know when this changed.

anyway, i'll have a go at repointing my grub.conf in a bit, and let you know how it pans out. It'll have to be after top gear tho, as I don't fancy a non booting media center whilst that's on!

----------

## i92guboj

If you do "make install" you can always be sure that the latest kernel will be copied to /boot/vmlinuz. No need to change anything. Easy, clean, it works.

----------

## NeddySeagoon

Graymi,

It works regardless of you having a real /boot or not.

When you have a real /boot, there is an additional constraint ... that the filesystems on /boot and / be the same.

ext2 and ext3 count as the same.

----------

## Graymi

sure does work,

excellent, no duplicated files  :Smile: 

----------

## cyrillic

 *Graymi wrote:*   

> and btw, cyrillic, i'm deifnately using x86_64, I tend not to update my kernel as the old one works fine, and updating it means i have to remeber all the various non built in modules which i have to recompile, tho for curisoities sake i'd be interested to know when this changed. 

 

I don't remember when it happened, but arch/i386 and arch/x86_64 were merged quite a long time ago.

If your kernel sources are new enough to have arch/x86 then the kernel you see in arch/x86_64/boot is probably just a symlink to the "real" kernel in arch/x86/boot

----------

## pappy_mcfae

The change in where the x86 kernel resides happened with the 2.6.24 family. Before then, i386 and x86_64 were the places where the kernels resided, respectively. Afterward, they contain links to x86.

Blessed be!

Pappy

----------

## prr56

I just did a new install of X86_64 and I am a long time user of "make install", but now it won't create vmlinuz in /boot.

It only creates vmlinuz-2.6.2XXXX-gentoo, not the separate vmlinuz. Is this a new behavior?

I have /boot mounted on a separate partition and it is always mounted-(used to forget to mount it when doing installs).

Any info on how to fix or repair will be greatly appreciated!

----------

