View previous topic :: View next topic |
Author |
Message |
juniper l33t


Joined: 22 Oct 2004 Posts: 763 Location: EU
|
Posted: Wed Dec 05, 2012 12:53 pm Post subject: expanding the boot partition |
|
|
I have a boot partition which is irritatingly small. it is on /dev/sda5 and I have nothing on /dev/sda6. I figure, I should just expand sda5 and shrink sda6.
should I use gparted + live cd? Is there a way to do it from within this OS? I only have one disk and it is sda, and / is on sda8.
I put this on OTW since it isn't gentoo specific (though I guess could be). |
|
Back to top |
|
 |
Fran Guru


Joined: 29 Feb 2004 Posts: 530 Location: Coruña (Spain)
|
Posted: Wed Dec 05, 2012 1:40 pm Post subject: Re: expanding the boot partition |
|
|
juniper wrote: | I have a boot partition |
Why?
juniper wrote: | should I use gparted + live cd? |
Easiest way, yeah. Put sysresccd in a spare usb flash drive (or do as I do, and put it in all your usb flash drives ) and done.
You can also delete them both (backup contents of sda5 first) and create them again with the desired sizes. You only need fdisk for that. |
|
Back to top |
|
 |
sikpuppy n00b


Joined: 12 Jun 2012 Posts: 34 Location: Central Coast, NSW
|
Posted: Wed Dec 05, 2012 3:06 pm Post subject: Re: expanding the boot partition |
|
|
Fran wrote: | juniper wrote: | I have a boot partition |
Why? |
Probably because that's the suggested layout in the manual.
I used to have difficulty getting ext4 partitions to boot, so I used to have a ext2 boot partition to get around that. |
|
Back to top |
|
 |
wah_wah_69 Tux's lil' helper


Joined: 26 Aug 2003 Posts: 145
|
Posted: Wed Dec 05, 2012 4:26 pm Post subject: Re: expanding the boot partition |
|
|
sikpuppy wrote: | Fran wrote: | juniper wrote: | I have a boot partition |
Why? |
Probably because that's the suggested layout in the manual.
I used to have difficulty getting ext4 partitions to boot, so I used to have a ext2 boot partition to get around that. |
Grub nowadays boots from ext4 just fine, at least on my system. _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
 |
Prenj n00b


Joined: 20 Nov 2011 Posts: 16
|
Posted: Wed Dec 05, 2012 4:46 pm Post subject: Re: expanding the boot partition |
|
|
wah_wah_69 wrote: | sikpuppy wrote: | Fran wrote: | juniper wrote: | I have a boot partition |
Why? |
Probably because that's the suggested layout in the manual.
I used to have difficulty getting ext4 partitions to boot, so I used to have a ext2 boot partition to get around that. |
Grub nowadays boots from ext4 just fine, at least on my system. |
Yeah, for couple of years now. |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 17130
|
Posted: Thu Dec 06, 2012 12:10 am Post subject: Re: expanding the boot partition |
|
|
There are plenty of valid uses. After 1024, I forget why I used one, but I'm pretty sure there was a reason. At the time, I know it was lack of fs support in the kernel, but I can't think of why. I haven't used that system much in several years, and it died a few months ago. Haven't gotten around to rebuilding it (I have the parts, need to extract the CPU cooler & CPU from the old mobo and rebuild with new parts).
EDIT:
Oh, I remember. My /boot is on a separate physical drive. IIRC, /boot & swap on the same drive. Because I could, mainly. Small drive, freed up the partitions / space on the other drives. _________________ I can saw a woman in two, but you won't want to look in the box when I'm through.
For my next trick, I'll need a volunteer. |
|
Back to top |
|
 |
sikpuppy n00b


Joined: 12 Jun 2012 Posts: 34 Location: Central Coast, NSW
|
Posted: Thu Dec 06, 2012 4:04 am Post subject: Re: expanding the boot partition |
|
|
wah_wah_69 wrote: |
Grub nowadays boots from ext4 just fine, at least on my system. |
Yes, now. But earlier it didn't. The question was why anyone would have a separate boot partition. It could be because that's how things had to be a few years ago. The answer wasn't "but things are different now". |
|
Back to top |
|
 |
juniper l33t


Joined: 22 Oct 2004 Posts: 763 Location: EU
|
Posted: Thu Dec 06, 2012 12:18 pm Post subject: Re: expanding the boot partition |
|
|
sikpuppy wrote: | wah_wah_69 wrote: |
Grub nowadays boots from ext4 just fine, at least on my system. |
Yes, now. But earlier it didn't. The question was why anyone would have a separate boot partition. It could be because that's how things had to be a few years ago. The answer wasn't "but things are different now". |
yeah, people these days don't seem to put boot on a separate partition. that is of course another option. simply move /boot to / and make it bootable and merge the other two partitions. perhaps this is easiest and I should just do that. can I do this without a live cd? I can copy the contents of /boot somewhere, unmount /boot, mkdir /boot, and move the contents back. I then should edit /etc/fstab, but will update-grub automagically make the new / partition bootable? |
|
Back to top |
|
 |
sikpuppy n00b


Joined: 12 Jun 2012 Posts: 34 Location: Central Coast, NSW
|
Posted: Thu Dec 06, 2012 12:54 pm Post subject: Re: expanding the boot partition |
|
|
juniper wrote: | sikpuppy wrote: | wah_wah_69 wrote: |
Grub nowadays boots from ext4 just fine, at least on my system. |
Yes, now. But earlier it didn't. The question was why anyone would have a separate boot partition. It could be because that's how things had to be a few years ago. The answer wasn't "but things are different now". |
yeah, people these days don't seem to put boot on a separate partition. that is of course another option. simply move /boot to / and make it bootable and merge the other two partitions. perhaps this is easiest and I should just do that. can I do this without a live cd? I can copy the contents of /boot somewhere, unmount /boot, mkdir /boot, and move the contents back. I then should edit /etc/fstab, but will update-grub automagically make the new / partition bootable? |
I think update-grub doesn't make the partition bootable, that's something you need to do elsewhere? Maybe it sets the boot flag however I think the first HDD set in the BIOS just trys to boot from the first partition regardless of whether the boot flag is set. |
|
Back to top |
|
 |
Bones McCracker Veteran


Joined: 14 Mar 2006 Posts: 1605 Location: U.S.A.
|
Posted: Sat Dec 08, 2012 4:12 pm Post subject: |
|
|
Separate boot does marginally improve security. As I recall, it was originally (i.e. years ago) necessary so that one could put the stage 2 bootloader within the range of storage addresses addressable by the stage 1 bootloader, which was constrained by the need to keep the stage 1 bootloader small enough to conform with the antediluvian DOS boot sector standard. _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
 |
LiamOS n00b


Joined: 06 Jun 2012 Posts: 56 Location: Kerry/Dublin, Ireland
|
Posted: Sat Dec 08, 2012 5:54 pm Post subject: |
|
|
If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. _________________ CFLAGS=" -O999999" |
|
Back to top |
|
 |
Bones McCracker Veteran


Joined: 14 Mar 2006 Posts: 1605 Location: U.S.A.
|
Posted: Sat Dec 08, 2012 10:11 pm Post subject: |
|
|
LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
So small he can't keep his bootsplash graphic collection and his last 64 kernels, System Maps and configs? _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
 |
Crooksey Apprentice


Joined: 26 Apr 2006 Posts: 239 Location: Vatican City
|
Posted: Sat Dec 08, 2012 10:59 pm Post subject: |
|
|
I have it on its own partition and not mounted
1, so I can't delete kernels accidentally
2, I like splitting my mount points down
3, it's ext2 as it takes a smaller journal than 3 or 4 (iirc)
4, when you've been doing the same thing for 8-9 years it becomes habit  |
|
Back to top |
|
 |
Bones McCracker Veteran


Joined: 14 Mar 2006 Posts: 1605 Location: U.S.A.
|
Posted: Sat Dec 08, 2012 11:52 pm Post subject: |
|
|
I also keep it on a separate partition most of the time. _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 17130
|
Posted: Sun Dec 09, 2012 5:39 am Post subject: |
|
|
Crooksey wrote: | 3, it's ext2 as it takes a smaller journal than 3 or 4 (iirc) | Much smaller. 0. But it is a lot less effective. _________________ I can saw a woman in two, but you won't want to look in the box when I'm through.
For my next trick, I'll need a volunteer. |
|
Back to top |
|
 |
NotQuiteSane Guru


Joined: 30 Jan 2005 Posts: 479 Location: Klamath Falls, Jefferson, USA, North America, Midgarth
|
Posted: Sun Dec 09, 2012 10:30 am Post subject: Re: expanding the boot partition |
|
|
Fran wrote: | juniper wrote: | should I use gparted + live cd? |
Easiest way, yeah. Put sysresccd in a spare usb flash drive (or do as I do, and put it in all your usb flash drives ) and done. |
incidently, for aslong as i'd been using Gentoo, I've always set up a 64mb boot. plently of room. but recently I've gone to 512-1024mb of disk space. this allows not only for me to k`eep the kernel onboard, but also systemrescuecd and other live cd's.
This allows me to use the live cd's to demonstrate different distros to curious people without having to keep alot of cd/dvi's on hand
NQS _________________ These opinions are mine, mine I say! Piss off and get your own.
As I see it -- An irregular blog, Improved with new location
To delete French language packs from system use 'sudo rm -fr /' |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 17130
|
Posted: Sun Dec 09, 2012 5:40 pm Post subject: |
|
|
How do you boot to the rescue on /boot? _________________ I can saw a woman in two, but you won't want to look in the box when I'm through.
For my next trick, I'll need a volunteer. |
|
Back to top |
|
 |
NotQuiteSane Guru


Joined: 30 Jan 2005 Posts: 479 Location: Klamath Falls, Jefferson, USA, North America, Midgarth
|
Posted: Sun Dec 09, 2012 5:53 pm Post subject: |
|
|
pjp wrote: | How do you boot to the rescue on /boot? |
http://wiki.gentoo.org/wiki/GRUB2#ISO_images
also of interest is the ability to boot a dm-crypt partition
NQS _________________ These opinions are mine, mine I say! Piss off and get your own.
As I see it -- An irregular blog, Improved with new location
To delete French language packs from system use 'sudo rm -fr /' |
|
Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 17130
|
Posted: Sun Dec 09, 2012 6:18 pm Post subject: |
|
|
Thanks, I'll check it out. dm-crypt (or fs/partition encryption is on my list). _________________ I can saw a woman in two, but you won't want to look in the box when I'm through.
For my next trick, I'll need a volunteer. |
|
Back to top |
|
 |
juniper l33t


Joined: 22 Oct 2004 Posts: 763 Location: EU
|
Posted: Mon Dec 10, 2012 12:20 pm Post subject: |
|
|
BoneKracker wrote: | LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
So small he can't keep his bootsplash graphic collection and his last 64 kernels, System Maps and configs? |
100MB. Back in the day that was enough. I basically haven't updated that number since 1999 when I first installed linux and kernels were 900kb. Ubuntu kernels are now a whopping 20-30 MB, so basically what happens is that I can only have 2 kernels in the /boot. When the system goes to update I usually just click OK and then it barfs if it is getting a kernel. |
|
Back to top |
|
 |
juniper l33t


Joined: 22 Oct 2004 Posts: 763 Location: EU
|
Posted: Mon Dec 10, 2012 12:24 pm Post subject: |
|
|
LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
there isn't anything on /dev/sda6. Are you suggesting that I can use gparted and expand /dev/sda5 and reduce /dev/sda6 while my OS is booted? Keep in mind that my OS is /dev/sda8 (i.e. the same physical disk). I thought that if you use gparted on part of a physical disk, no part of that disk can be mounted. I have no basis to think this though. If so, however, this will be trivial no? Unmount /boot, fire up gparted, shrink/grow, remount. Child's play, no? |
|
Back to top |
|
 |
LiamOS n00b


Joined: 06 Jun 2012 Posts: 56 Location: Kerry/Dublin, Ireland
|
Posted: Mon Dec 10, 2012 5:31 pm Post subject: |
|
|
juniper wrote: | LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
there isn't anything on /dev/sda6. Are you suggesting that I can use gparted and expand /dev/sda5 and reduce /dev/sda6 while my OS is booted? Keep in mind that my OS is /dev/sda8 (i.e. the same physical disk). I thought that if you use gparted on part of a physical disk, no part of that disk can be mounted. I have no basis to think this though. If so, however, this will be trivial no? Unmount /boot, fire up gparted, shrink/grow, remount. Child's play, no? |
That's exactly what I'm thinking. I'm almost certain you can use gparted on any part of any disk, provided the sections you're editing are unmounted.
Try it, at least. If gparted won't let you do that, then there's no harm. _________________ CFLAGS=" -O999999" |
|
Back to top |
|
 |
Bones McCracker Veteran


Joined: 14 Mar 2006 Posts: 1605 Location: U.S.A.
|
Posted: Mon Dec 10, 2012 11:36 pm Post subject: |
|
|
juniper wrote: | BoneKracker wrote: | LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
So small he can't keep his bootsplash graphic collection and his last 64 kernels, System Maps and configs? |
100MB. Back in the day that was enough. I basically haven't updated that number since 1999 when I first installed linux and kernels were 900kb. Ubuntu kernels are now a whopping 20-30 MB, so basically what happens is that I can only have 2 kernels in the /boot. When the system goes to update I usually just click OK and then it barfs if it is getting a kernel. |
I made mine 32 cylinders (about 268 MiB). I rarely have more than about 12 MiB of stuff in there, but this way I don't stupidly force myself into a jug-fuck of moving partitions around if I want to do something that requires more space. _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
 |
juniper l33t


Joined: 22 Oct 2004 Posts: 763 Location: EU
|
Posted: Tue Dec 11, 2012 9:36 am Post subject: |
|
|
BoneKracker wrote: | juniper wrote: | BoneKracker wrote: | LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
So small he can't keep his bootsplash graphic collection and his last 64 kernels, System Maps and configs? |
100MB. Back in the day that was enough. I basically haven't updated that number since 1999 when I first installed linux and kernels were 900kb. Ubuntu kernels are now a whopping 20-30 MB, so basically what happens is that I can only have 2 kernels in the /boot. When the system goes to update I usually just click OK and then it barfs if it is getting a kernel. |
I made mine 32 cylinders (about 268 MiB). I rarely have more than about 12 MiB of stuff in there, but this way I don't stupidly force myself into a jug-fuck of moving partitions around if I want to do something that requires more space. |
well, that's the situation i am in now. I will probably just increase it to 500MB and be done with it. Have my disc is unused, so... |
|
Back to top |
|
 |
Bones McCracker Veteran


Joined: 14 Mar 2006 Posts: 1605 Location: U.S.A.
|
Posted: Tue Dec 11, 2012 12:07 pm Post subject: |
|
|
juniper wrote: | BoneKracker wrote: | juniper wrote: | BoneKracker wrote: | LiamOS wrote: | If sda6 isn't system critical( /usr or something), you can just unmount sda5 and sda6 and then use gparted from within the working system. /boot doesn't need to be mounted.
Also, how small is your /boot? I'm interested to know how small is small enough to be annoying. |
So small he can't keep his bootsplash graphic collection and his last 64 kernels, System Maps and configs? |
100MB. Back in the day that was enough. I basically haven't updated that number since 1999 when I first installed linux and kernels were 900kb. Ubuntu kernels are now a whopping 20-30 MB, so basically what happens is that I can only have 2 kernels in the /boot. When the system goes to update I usually just click OK and then it barfs if it is getting a kernel. |
I made mine 32 cylinders (about 268 MiB). I rarely have more than about 12 MiB of stuff in there, but this way I don't stupidly force myself into a jug-fuck of moving partitions around if I want to do something that requires more space. |
well, that's the situation i am in now. I will probably just increase it to 500MB and be done with it. Have my disc is unused, so... |
You could just put your boot partition somewhere else on the disk, but if you're OCD, that won't do. Besides, moving partitions around has the side effect of defragmentation, if you do it right. Boot from CD, purge your tmp directories, then 'cp -a' each partition somewhere else (ideally, with the destination partition(s) mounted with the same options as the originals, as it pertains to atimes and that sort of thing). Then fix your partitions and 'cp -a' it all back. You can do a byte-wise copy or move using dd or the equivalent (which is what most partition utility "move" and "copy" functions do, I think), but that wastes time moving all your empty space, does not defragment the filesystem, and replicates any filesystem errors. Tar and compression might be useful, but if your disk is less than half full, you have no issue, and I'm not sure it actually saves any time unless you're copying somewhere over the network.
I've done this sort of thing several times without problems, so if you destroy your data, it's not my fault.  _________________
patrix_neo wrote: | The human thought: I cannot win.
The ratbrain in me : I can only go forward and that's it. |
|
|
Back to top |
|
 |
|