LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2009, 03:32 AM   #1
ngiamol
Member
 
Registered: Apr 2009
Location: Athens - Hellas (greece)
Distribution: Centos
Posts: 36

Rep: Reputation: 16
Boot partition is full


Good morning everyone (at least here is morning )

My linux box has Mandriva pwp 2009. During some other strange messages while boot, i saw that i have no space left on /boot partition.

When i installed the distro, i used a different partition whish had 25mb of space.

Today after i read some posts, ive found that this space is very low (someone suggested 256 mb). What you advice me to do? to increase the space of the partition? to leave it as is? (except the warning during boot, i dont have any other problem) or delete some files? Any advice please?


Thanks in Advance
Nick.
 
Old 05-08-2009, 06:50 AM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
25Mb used to be plenty for /boot, but I see that with only 2 kernels in mine, I'm using 37Mb. I can't see a need for 256Mb, but 25Mb is pretty small. On my system there are fairly frequent updates of the kernel and the old kernel is left. Leaving the old kernel is a good idea, because sometimes a new kernel doesn't work right and I need to boot with the old one.

It is not a good idea to remove any files from /boot unless you know what you are removing. I usually remove old kernels with the package manager keeping only the latest two kernels.

It would be good to run 'df -h' and see how much of /boot is currently being used. Also do 'ls' in /boot to see how many kernels there are there. I'm running Ubuntu and not Mandriva; so I'm not sure how the kernel upgrades go on your system.
 
Old 05-09-2009, 05:08 AM   #3
ngiamol
Member
 
Registered: Apr 2009
Location: Athens - Hellas (greece)
Distribution: Centos
Posts: 36

Original Poster
Rep: Reputation: 16
Here we are

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 15G 2,8G 11G 21% /
/dev/sda1 23M 22M 0 100% /boot
/dev/sda8 1,8T 21G 1,8T 2% /home
/dev/sda7 49G 828M 45G 2% /var

and the list

[root@samba boot]# ls
boot.backup.sda kernel.h-2.6.27.10-desktop-1mnb
config@ kernel.h-2.6.27.19-desktop-1mnb
config-2.6.27.10-desktop-1mnb kernel.h-2.6.27-desktop-0.rc8.2mnb
config-2.6.27.19-desktop-1mnb lost+found/
config-2.6.27-desktop-0.rc8.2mnb System.map@
gfxmenu System.map-2.6.27.10-desktop-1mnb
grub/ System.map-2.6.27.19-desktop-1mnb
initrd-2.6.27.10-desktop-1mnb.img System.map-2.6.27-desktop-0.rc8.2mnb
initrd-2.6.27.19-desktop-1mnb.img vmlinuz@
initrd-2.6.27-desktop-0.rc8.2mnb.img vmlinuz-2.6.27.10-desktop-1mnb
initrd-desktop.img@ vmlinuz-2.6.27.19-desktop-1mnb
initrd.img@ vmlinuz-2.6.27-desktop-0.rc8.2mnb
kernel.h@ vmlinuz-desktop@


Is there any safe way to expand the /boot partition?
Have in mind that, all partitions are created in same array (raid controller)


Thanks in advance
Nick.
 
Old 05-09-2009, 09:11 AM   #4
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
It looks like there are 3 kernels there. It would be possible to delete one of them and make room. However, this will continue to be a problem.

I don't think you can resize sda1, because there is probably no space between that and the extended partition in which those other partitions are located.

I think the best bet would be to move /boot to your root partition where you have 11Gb available. You would not create it as any size; so it will not run out. You could probably resize sda8 and make a new partition for /boot, but that seems silly to me. Is your root partition either ext2 or ext3? I think some filesystem types are not good for /boot, but I know those are.

The parts to doing this would be to first make sure you know how to install grub in the mbr. With the old grub, it is simply as root 'grub-install /dev/sda' Try that first to make sure you can do it and it works. Otherwise, you will need to find out how to do that on your system, because you will be changing the location of where the kernel is and I think it will require new info in the mbr.

Then you will:

1. Create /newboot and copy all that is in /boot to that directory. Be sure to use 'cp -a' to get all the links and any hidden files.
2. Unmount /boot
3. Remove the /boot directory(which should be empty now) and rename /newboot to /boot
4. Comment out the entry in /etc/fstab where sda1 gets mounted as /boot
5. Run 'grub-install /dev/sda' or whatever is needed to do that job.
6. Reboot

Let us know if this sounds good and if you need any more information. If it doesn't work, you will be able to use commandline grub to get into the system.

Also realize that I know nothing about raid, but I don't see how this would interfere with that. You may want to wait awhile to see if anyone has other idea or cautions.
 
Old 05-09-2009, 09:45 AM   #5
ngiamol
Member
 
Registered: Apr 2009
Location: Athens - Hellas (greece)
Distribution: Centos
Posts: 36

Original Poster
Rep: Reputation: 16
The worst enemy for a newbie like me is the wrong information.

In my case, i thought that /boot partition used to store temporary files ONLY during boot proccess.

Anyway, is it possible to install another one boot loader which will be located within root dir? (/boot2 or something similar) and move the needed files there? ( i can spare an old 10Gb disk and copy/move the needed files there).

In case that i do nothing, is it possible to have any problem in future?
The first priority for me is to have a stable system.

Thanks in Advance
Nick
 
Old 05-09-2009, 04:53 PM   #6
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
Quote:
Originally Posted by ngiamol View Post
Anyway, is it possible to install another one boot loader which will be located within root dir? (/boot2 or something similar) and move the needed files there?
That is what I suggested, I think. You will copy all the files from /boot into a new directory within the root directory which I suggested calling /newboot.

After the copy, you would unmount the the /boot partition which would leave all the files safely stored on that partition, but no longer showing up in /boot which would now be the empty mount point on your root partition. (I know that mounted partitions is a little hard to understand at first.)

Then, after the /boot partition is unmounted and you have the empty /boot directory, you would delete the empty directory and rename /newboot to /boot. Now all your files are there.

Then you comment out the line in /etc/fstab that automatically mounts that sda1 partition as /boot; so that it does mount. You have to run grub-install in order to put the new information on where the kernel is located. That copy is not in the same place as it used to be. In fact, now that I think of it, you should probably run 'update-grub' first, before 'grub-install' because the menu.lst file may need to be updated to indicate that the kernel is on the root partition and not the old sda1.


Quote:
In case that i do nothing, is it possible to have any problem in future?
The first priority for me is to have a stable system.
Having said all that stuff above, I feel that this is not newbie type stuff to do and you might make a mistake and the system might not boot after doing this process. I would do it, but I know that I can take a rescue disk and repair the damage. All this stuff is new to you and I think it might be wise to just remove the old kernel.

I don't know what your package manager is. Have you ever installed software with something that lists what is installed on your system? That would be your package manager. That would be the best way to remove the old kernel which would make room for your next one.

I see these in your /boot

vmlinuz-2.6.27.10-desktop-1mnb
vmlinuz-2.6.27.19-desktop-1mnb
vmlinuz-2.6.27-desktop-0.rc8.2mnb

2.6.27.10 is definitely older than 2.6.27.19. I don't know what the last one is.

Do 'uname -r' and that will tell you which kernel is being used right now. It is probably .19. That means you could open your package manager and uninstall .10, because you are not using it. That will free up some room. If you are sure that you do not use that last one, you could remove it, too, but be sure that it is older than .19 and that you are not using it.

If you check what kernel is running and use the package manager to uninstall it, you will not hurt your system. That would be my recommendation.
 
Old 05-10-2009, 06:02 AM   #7
ngiamol
Member
 
Registered: Apr 2009
Location: Athens - Hellas (greece)
Distribution: Centos
Posts: 36

Original Poster
Rep: Reputation: 16
I forgot to mention that i have installed webmin in my system.

Webmin have a module called "GRUB boot loader", and it has the option "install grub"
but i really don't know if it moves the files too.

That might do the work?

Btw the uname -r command gives me that : 2.6.27.19-desktop-1mnb

Thanks in Advance
Nick

Last edited by ngiamol; 05-10-2009 at 06:03 AM.
 
Old 05-10-2009, 06:47 AM   #8
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
Webmin's grub section does not have anything to move those files.

Since you are using that .19 kernel, I'd suggest you open your package manager and look for those other two kernels and uninstall them.

Later after you have learned more about Linux, you can more confidently move /boot to the root partition, reconfigure and reinstall grub to the mbr, and fix fstab so the old /boot doesn't load. By then you will know how to use a rescue disk or to run grub by commandline to load a broken system.

If you remove those two kernels with the package manager, it should get rid of the files that go with each one and make your /boot much less full. Then when you have the next kernel update, you can keep the old one and delete it when you are sure the new one is running well.

If you want to try moving /boot etc. I can give you step by step. And we can do checks along the way.
 
Old 05-10-2009, 07:26 AM   #9
ngiamol
Member
 
Registered: Apr 2009
Location: Athens - Hellas (greece)
Distribution: Centos
Posts: 36

Original Poster
Rep: Reputation: 16
What ill do.

Ill open my file manager and removing the old kernels. But, i wouldlike a step by step "guide" to try it on a test machine.
The worst thing i can do is to try it on a "working" machine and blow it up.


err i mean package manager

And the results after the procedure.

[root@samba /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 15G 2,7G 11G 20% /
/dev/sda1 23M 8,6M 14M 40% /boot
/dev/sda8 1,8T 21G 1,8T 2% /home
/dev/sda7 49G 823M 45G 2% /var


Thanks Much
Nick

Last edited by ngiamol; 05-10-2009 at 08:04 AM.
 
Old 05-10-2009, 09:55 AM   #10
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

Rep: Reputation: 46
LOL. I saw file manager and panicked! Good going! Now you have room for another kernel and goodies that go with it. Have fun on your Linux adventures.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/boot partition full of rubbish? timnp Linux - Distributions 6 12-12-2008 03:46 PM
Full disk encryption on boot partition paul_mat Linux - Security 13 03-12-2008 03:11 AM
Boot partition nearly full Yig Linux - Newbie 10 10-26-2007 10:34 PM
boot partition full spiri Debian 3 09-13-2005 07:05 PM
/boot partition full aagha Linux - General 9 06-17-2003 08:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration