LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Minimum space for a boot partition (https://www.linuxquestions.org/questions/linux-newbie-8/minimum-space-for-a-boot-partition-631184/)

kssuhesh 03-28-2008 01:33 AM

Minimum space for a boot partition
 
Hi
I have to clear my doubt on the boot partition ...
The minimum size required for a boot partition ??

Most commonly use 100MB as the /boot size.. But I noticed the usage of the /boot partition in most of the system is less than 25%

Here I quote the disk usage of one of my system here only 9% is used.

=======================================================
[root@newvision ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 37G 7.9G 27G 24% /
/dev/hda1 99M 8.4M 86M 9% /boot
none 125M 0 125M 0% /dev/shm
192.168.1.200:/usr/home
73G 51G 16G 77% /home
=======================================================

Why we wasted the rest of the space...

Please made suggestions about that .....

Thanks
In Advance...........:cool:

syg00 03-28-2008 01:59 AM

You've got 16 Gig unused in /home, and you're worried about 86 *MEG* ????

Bruce Hill 03-28-2008 02:04 AM

How big is that hard drive?

And you're worried about 86M of space?

I have many files larger than that.

If you won't be adding anything else, then it looks
like 9M is large enough. But why push yourself and
make it too small to add another kernel?

Here's mine on one of 6 comps:
Code:

/dev/sda5              93M  26M  68M  28% /boot

mingdao@silas:~$ ls -l /boot/
total 22644
-rw-r--r--  1 root root 1593139 2008-03-28 08:36 2.6.24.4-initrd.gz
lrwxrwxrwx  1 root root      37 2008-03-23 18:17 README.initrd -> /usr/doc/mkinitrd-1.3.1/README.initrd
lrwxrwxrwx  1 root root      25 2008-03-28 08:29 System.map -> /boot/System.map-2.6.24.4
-rw-r--r--  1 root root  743388 2008-03-28 08:29 System.map-2.6.24.4
-rw-r--r--  1 root root  844132 2008-03-19 15:22 System.map-generic-2.6.24.3
-rw-r--r--  1 root root  880295 2008-03-19 14:07 System.map-generic-smp-2.6.24.3-smp
-rw-r--r--  1 root root 1282654 2008-03-19 15:36 System.map-huge-2.6.24.3
-rw-r--r--  1 root root 1320434 2008-03-19 14:55 System.map-huge-smp-2.6.24.3-smp
-rw-r--r--  1 root root    512 2008-03-23 18:31 boot.0800
lrwxrwxrwx  1 root root      28 2008-03-23 18:26 config -> config-huge-smp-2.6.24.3-smp
-rw-r--r--  1 root root  82369 2008-03-19 15:22 config-generic-2.6.24.3
-rw-r--r--  1 root root  82657 2008-03-19 14:07 config-generic-smp-2.6.24.3-smp
-rw-r--r--  1 root root  82208 2008-03-19 15:36 config-huge-2.6.24.3
-rw-r--r--  1 root root  82606 2008-03-19 14:55 config-huge-smp-2.6.24.3-smp
-rw-r--r--  1 root root    5040 2008-03-08 08:26 diag1.img
drwxr-xr-x 10 root root    4096 2008-03-28 08:36 initrd-tree/
-rw-r--r--  1 root root 1743720 2008-03-24 18:35 initrd.gz
-rw-------  1 root root  36864 2008-03-28 08:36 map
-rw-r--r--  1 root root  15754 2008-02-22 08:08 slack.bmp
lrwxrwxrwx  1 root root      29 2008-03-23 18:26 vmlinuz -> vmlinuz-huge-smp-2.6.24.3-smp
-rw-r--r--  1 root root 1541144 2008-03-28 08:30 vmlinuz-2.6.24.4
-rw-r--r--  1 root root 2055448 2008-03-19 15:22 vmlinuz-generic-2.6.24.3
-rw-r--r--  1 root root 2167224 2008-03-19 14:07 vmlinuz-generic-smp-2.6.24.3-smp
-rw-r--r--  1 root root 4204984 2008-03-19 15:36 vmlinuz-huge-2.6.24.3
-rw-r--r--  1 root root 4369624 2008-03-19 14:55 vmlinuz-huge-smp-2.6.24.3-smp

PC = personal computer = your choice :D

ashok choudhary 03-28-2008 02:05 AM

By Niht Pvt.ltd. Jaipur-+91-9829251646
 
Hi,
when your system boots at that time it creats some temporary files
that's why we required some extra space for boot partition in linux/windows

Natilous 03-28-2008 02:34 AM

space of boot partition depends on your kernels...
if you have many kernels run in your pc, size of boot partition must be larger than 86MB .

good luck.

aarcane 03-28-2008 03:31 AM

a standard desktop system can make due with 15-20 MB of space easily, and even less. however, having spare space allows, for example, sharing a /boot partition between multiple distros, or having previous or alternate kernels, for example, an rt kernel for music mixing, and a standard kernel for every day work stuff.

if you considder that you can't buy a harddrive smaller than 40G today, allocating 100M to /boot is perfectly reasonable. of course, if you're setting up a desktop, running only one distro, and using ext2 or any filesystem that grub supports natively, don't even bother with /boot.

kssuhesh 03-28-2008 06:01 AM

I just want to know the size of the boot partition mainly. The disk usage I mentioned is for showing the boot partition usage.

Is it possible to create temperory files in the /boot. At boot up the partitions are mounted as readonly then how it is possible ???

pixellany 03-28-2008 06:28 AM

A separate /boot partition is not required at all...If you think you need one, then there is no real penalty for making it 100MB.

I think that some systems initially mount partitions read-only, but then later change to read-write. Run the "mount" command after bootup to see.

jschiwal 03-28-2008 06:39 AM

A separate boot partition is a good idea if your main partition is an LVM volume. If you reinstall in the future you could make the /boot partition smaller. 40-50MB would be fine and allow for 4 or more kernel/initrd's.

onebuck 03-28-2008 07:41 AM

Hi

The main reason behind a separate '/boot' partition was to get under the '1024 cylinder limit' problem. This problem doesn't exist with modern Linux systems. The use of the '/boot' is for the system kernel(s), system information and possible 'initrd' uses.

If the 'OP' is using multiple boots and needs separate kernels and such then '100MB' in modern computer HDD is really small in comparison for a '/boot'. As stated this is a 'PC' and should be able to do as he/she wishes.

syg00 03-28-2008 03:48 PM

Quote:

Originally Posted by onebuck (Post 3103027)
Hi

The main reason behind a separate '/boot' partition was to get under the '1024 cylinder limit' problem. This problem doesn't exist with modern Linux systems.

This problem doesn't exist with modern *BIOS* - it was never an operating system problem, per se. Linux or otherwise. Windows used to require the first partition on a disk - this helps explain why.

As for size of a boot partition - some installers make ridiculous assumptions. On two separate systems I have had to increase my boot to accommodate Ubuntu upgrades because the partition was reported as too small. One had 48 Meg free.

onebuck 03-28-2008 05:40 PM

Hi,
Quote:

Originally Posted by syg00 (Post 3103455)
This problem doesn't exist with modern *BIOS* - it was never an operating system problem, per se. Linux or otherwise. Windows used to require the first partition on a disk - this helps explain why.

As for size of a boot partition - some installers make ridiculous assumptions. On two separate systems I have had to increase my boot to accommodate Ubuntu upgrades because the partition was reported as too small. One had 48 Meg free.

And the problem with my statement? The problem doesn't exist with modern Linux systems, I did not state operating systems. I never made a M$ statement.

sundialsvcs 03-28-2008 06:54 PM

The bottom line is that you really don't want to run out of space in there, assuming that you have the necessary files for, say, "two or three" kernel-versions: the current one and a couple of earlier ones that you can use as fallbacks.

Many distros supply several kernel-images "just in case" you need them; if you know you don't, you can remove them. For example, your distro has installed four possibilities:
  • "Huge" RAM-sizes or "not so huge"
  • Multiple CPUs/Cores ("SMP"), or "just one engine."
You don't need them all.

As usual, "wasteful equals convenient," and sometimes "convenient" wins. If you're concerned about having too much space here, I think I'd worry about other things first. If you do determine what's the "minimum" size-requirement, well, you might do so by means of regret!

jschiwal 03-28-2008 10:25 PM

The /boot partition is separate from the boot loader so that the boot loader can load in the kernel and initrd. A 50-100MB partition out of a 60GB drive doesn't amount to much.

aarcane 03-29-2008 12:10 AM

a /boot partition is required because grub doesn't support such things as raid1, 5. lvm, encrypted, and compressed file systems as root. nor does lilo. you have to have the kernel and the initrd in a location that grub can find them. once they're loaded, you can have root wherever you want.

if grub can read your / partition, IE ext2, ext3, etc.. you can do without a /boot

kssuhesh 03-29-2008 02:56 AM

Quote:

Originally Posted by jschiwal (Post 3103704)
If you see the "read" command in a bash script, it is probably wrong.

At the time of booting (in greug.conf)

Quote:

kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/
At first the root filesystem is mounted as readonly and in the booting process it is remounted as readwrite.

A message in the booting process i quoted below
Quote:

Remounting root filesystem in read write mode

kssuhesh 03-29-2008 02:57 AM

Is it all the partitions are mounted as readonly or not ?

kssuhesh 03-29-2008 03:02 AM

Hi
What is the importance of /etc/mtab
and what is meant by mounting filesystem without writing /etc/mtab ?
Thanks
Quote:

Mounting otion -n
Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read-only file system.
In Advance .......

jschiwal 03-29-2008 06:29 AM

Quote:

Originally Posted by kssuhesh (Post 3103828)
At the time of booting (in greug.conf)



At first the root filesystem is mounted as readonly and in the booting process it is remounted as readwrite.

A message in the booting process i quoted below

The last line is just my signature. My point is that the kernel needs to be loaded to be able to mount the LVM partition and some types of raid. It is usually a good idea to have a separate /boot partition. It is small and can be easily backed up and restored in an emergency.


All times are GMT -5. The time now is 08:33 PM.