Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Purpose of /boot & when do I get to use it?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
convict
n00b
n00b


Joined: 15 Nov 2009
Posts: 16
Location: Melbourne, Teh Aussies

PostPosted: Fri Nov 20, 2009 4:36 am    Post subject: Purpose of /boot & when do I get to use it? Reply with quote

Alright, I figured it's related to the bootup process... but what exactly is it for & what files are usually stored in there?

And the next thing... I started the Gentoo installation as per the instructions in the handbook, but I think I have done something wrong. I made it up to the configuring bootloader part without having had anything to do with /boot except for creating and formatting the partition... I just though it's weird that I hadn't actually put anything in /boot and I was supposed to get the bootloader working already. Is there indeed something I'm doing wrong?
Back to top
View user's profile Send private message
dylix
Apprentice
Apprentice


Joined: 20 Sep 2002
Posts: 261
Location: Atlanta

PostPosted: Fri Nov 20, 2009 5:35 am    Post subject: Re: Purpose of /boot & when do I get to use it? Reply with quote

convict wrote:
Alright, I figured it's related to the bootup process... but what exactly is it for & what files are usually stored in there?

And the next thing... I started the Gentoo installation as per the instructions in the handbook, but I think I have done something wrong. I made it up to the configuring bootloader part without having had anything to do with /boot except for creating and formatting the partition... I just though it's weird that I hadn't actually put anything in /boot and I was supposed to get the bootloader working already. Is there indeed something I'm doing wrong?


apparently the reasoning is that if something happens to your / you'll still be able to boot since /boot is not generally mounted when using the os (as per the handbook fstab setup)..

when u are in grub and run setup (hd0) or what have you, then it will copy nessecary to mbr & /boot.. ofcourse dont forget to copy your kernel over there too :P

will that explanation work? its sorta late, so thats all i got
_________________

https://dylix.org/
Back to top
View user's profile Send private message
convict
n00b
n00b


Joined: 15 Nov 2009
Posts: 16
Location: Melbourne, Teh Aussies

PostPosted: Fri Nov 20, 2009 5:39 am    Post subject: Reply with quote

So, /boot houses the boot loader and all related files as well as the kernel image... correct?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3266
Location: Canada

PostPosted: Fri Nov 20, 2009 5:53 am    Post subject: Reply with quote

convict wrote:
So, /boot houses the boot loader and all related files as well as the kernel image... correct?


correct
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Fri Nov 20, 2009 6:50 am    Post subject: Reply with quote

convict wrote:
So, /boot houses the boot loader and all related files as well as the kernel image... correct?


correct, though in the handbook it does tell you to copy your bzImage over to /boot if you configure the kernel by hand (and it might mention this if using genkernel as well - dunno, havent touched genkernel in years)

So if you don't have the kernel image over there, as you would have well guessed this is a problem.

Boot in this case is really grub's own little sandbox to play, where it can keep its configuration files, stage files, the kernel image, etc.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Fri Nov 20, 2009 8:50 am    Post subject: Reply with quote

And if you are using a raid0 setup - at least in the past - grub could only boot a kernel from a plain partition or a raid1 partition.

And if you intend to use some kind of encrypted root, you might want to have access to a kernel, which can decrypt you boot (if there is not /boot partition, your have an egg-hen problem...)

just my .02$
V.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Fri Nov 20, 2009 9:38 am    Post subject: Reply with quote

if it helps, I have this in /boot

Code:
 # find /boot
/boot
/boot/grub
/boot/grub/boot
/boot/grub/boot/grub
/boot/grub/boot/grub/device.map
/boot/grub/menu.lst
/boot/grub/default
/boot/grub/pxegrub
/boot/grub/device.map
/boot/grub/e2fs_stage1_5
/boot/grub/grub.conf
/boot/grub/stage2_eltorito
/boot/grub/splash.xpm.gz
/boot/grub/ufs2_stage1_5
/boot/grub/stage2.netboot
/boot/grub/iso9660_stage1_5
/boot/grub/jfs_stage1_5
/boot/grub/xfs_stage1_5
/boot/grub/minix_stage1_5
/boot/grub/fat_stage1_5
/boot/grub/vstafs_stage1_5
/boot/grub/nbgrub
/boot/grub/stage1
/boot/grub/stage2.old
/boot/grub/reiserfs_stage1_5
/boot/grub/ffs_stage1_5
/boot/grub/stage2
/boot/memtest86plus
/boot/memtest86plus/memtest.bin
/boot/boot
/boot/System.map-genkernel-x86-2.6.28-hardened-r9
/boot/.keep
/boot/initramfs-genkernel-x86-2.6.28-hardened-r9
/boot/kernel-genkernel-x86-2.6.28-hardened-r9


Rich
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Fri Nov 20, 2009 3:47 pm    Post subject: Reply with quote

Quote:
So, /boot houses the boot loader and all related files as well as the kernel image... correct?


the bootloader is stored in the mbr of your drive, in /boot you´ll find kernel images, configuration files and other random stuff to get the loader working.
/boot isn´t really necessary in a default setup except for a few cases like the ones Veldrin mentioned.

cheers
_________________
Error: Failing not supported by current locale
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Fri Nov 20, 2009 3:54 pm    Post subject: Reply with quote

convict,

All the above explainations are correct as far as they go. If you want the full history lesson, it runs to about 12 pages and is written up in the Large Disk HOWTO, which you will find on tldp.org.

In brief, a /boot partition is required in an area of the drive that the BIOS can read as the BIOS is used to load the files needed for booting.
Its only an issue on machines that are fitted with hard drives bigger then the BIOS can read.

A /boot partition is a good idea if you want to boot several distros but its not required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Nov 20, 2009 5:12 pm    Post subject: Reply with quote

gringo wrote:

the bootloader is stored in the mbr of your drive
For grub, the stage1 bootloader is stored in the MBR, which gets the boot process kicked off, but the stage2 and remainder support files are all in /boot.

(Note that I'm talking about grub's stages -- not Gentoo's)
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Sat Nov 21, 2009 7:54 pm    Post subject: Reply with quote

also, in the old days a systems bios couldn't read a boot partition if it exceeded the first few cylinders on the disk.
having a small /boot partition gets round this limitation.

However, I don't believe this is much of an issue today, but its still handy for booting from raid1 or having an LVM root slice etc.

Rich.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum