Due to the peculiar way that my root drive is configured (incomplete advance planning for Windows to Linux conversion), I have had thoughts about moving /boot and / to a different place on the drive. Current configuration is:
sda1 - 30Gb primary partition (was the E: drive) sda2 - 120 Gb primary partition (was my H: drive) sda3 - 100Mb /boot primary partition sda4 - Extended partition sda5 - 4Gb swap partition sda6 - 145Gb / partition
I was thinking about rearranging the disk to a more conventional layout where /boot is first, swap next, / next and the rest after that. It probably isn't necessary since the drive runs fine (well, almost - last night /boot developed a weirdity in its superblock and I had to recover with the install DVD in rescue mode and using the alternate superblock, but it's back up and running, having survived the boot fsck), but I was wondering if anyone had tried something like this before. Besides, having a backup (or new) /boot might not be a bad idea after last night....
Are there any serious advantages/disadvantages to having /boot in the middle of the disk and / after it?
I was thinking that I could remove the 1 & 2 partitions, recreate them with a hole in between for a (new/replacement) swap, and copy the original partitions to the new locations, then update the grub.conf and voila! (I would hope....)
I'm also wondering about complications from having the swap and / partitions inside the extended partition....
Comments / suggestions / feedback (preferably polite) welcome.
Thanks.
Mark Hull-Richter, Linux Kernel Engineer DATAllegro (www.datallegro.com) 85 Enterprise, Second Floor, Aliso Viejo, CA 92656 949-680-3082 - Office 949-330-7691 - fax
On Wed, Apr 11, 2007 at 10:59:32AM -0700, Mark Hull-Richter wrote:
Due to the peculiar way that my root drive is configured (incomplete advance planning for Windows to Linux conversion), I have had thoughts about moving /boot and / to a different place on the drive. Current configuration is:
sda1 - 30Gb primary partition (was the E: drive) sda2 - 120 Gb primary partition (was my H: drive) sda3 - 100Mb /boot primary partition sda4 - Extended partition sda5 - 4Gb swap partition sda6 - 145Gb / partition
I was thinking about rearranging the disk to a more conventional layout where /boot is first, swap next, / next and the rest after that. It probably isn't necessary since the drive runs fine (well, almost - last night /boot developed a weirdity in its superblock and I had to recover with the install DVD in rescue mode and using the alternate superblock, but it's back up and running, having survived the boot fsck), but I was wondering if anyone had tried something like this before. Besides, having a backup (or new) /boot might not be a bad idea after last night....
If you want, send me privately the contents of /boot and I'll make an iso for you (or just learn how to use mkisofs and isolinux ;).
Are there any serious advantages/disadvantages to having /boot in the middle of the disk and / after it?
Not really, If you're using sata then I suppose your bios isn't limited as the older ones where.
I was thinking that I could remove the 1 & 2 partitions, recreate them with a hole in between for a (new/replacement) swap, and copy the original partitions to the new locations, then update the grub.conf and voila! (I would hope....)
Don't forget /etc/fstab and rerun grub-install. Also, printout the output of sfdisk -d.
I'm also wondering about complications from having the swap and / partitions inside the extended partition....
Not really, but don't forget that the lower (ie., near the end) portions of harddisks are the slower ones.
On Wed, 2007-04-11 at 19:29 +0100, Luciano Miguel Ferreira Rocha wrote:
On Wed, Apr 11, 2007 at 10:59:32AM -0700, Mark Hull-Richter wrote:
...
I was thinking about rearranging the disk to a more conventional layout where /boot is first, swap next, / next and the rest after that. It probably isn't necessary since the drive runs fine
... Restructuring is possible but probably not worth the effort. If it ain't broke... ...
If you want, send me privately the contents of /boot and I'll make an iso for you (or just learn how to use mkisofs and isolinux ;).
See the following post in the archives for a procedure for making a GRUB boot CD: http://lists.centos.org/pipermail/centos/2007-January/073835.html
Phil
Phil Schaffner wrote:
See the following post in the archives for a procedure for making a GRUB boot CD: http://lists.centos.org/pipermail/centos/2007-January/073835.html
Just read the grub documentation:-)
Mark Hull-Richter wrote:
Due to the peculiar way that my root drive is configured (incomplete advance planning for Windows to Linux conversion), I have had thoughts about moving /boot and / to a different place on the drive. Current configuration is:
sda1 - 30Gb primary partition (was the E: drive) sda2 - 120 Gb primary partition (was my H: drive) sda3 - 100Mb /boot primary partition sda4 - Extended partition sda5 - 4Gb swap partition sda6 - 145Gb / partition
I was thinking about rearranging the disk to a more conventional layout
What problem are you trying to solve?
where /boot is first, swap next, / next and the rest after that. It probably isn't necessary since the drive runs fine (well, almost - last night /boot developed a weirdity in its superblock and I had to recover with the install DVD in rescue mode and using the alternate superblock, but it's back up and running, having survived the boot fsck), but I was wondering if anyone had tried something like this before. Besides, having a backup (or new) /boot might not be a bad idea after last night....
Are there any serious advantages/disadvantages to having /boot in the middle of the disk and / after it?
I was thinking that I could remove the 1 & 2 partitions, recreate them with a hole in between for a (new/replacement) swap, and copy the original
There is no advantage*, with Linux 2.6 kernels, to having a swap partition over having a swap file. Swap files are more flexible, easier to manage. As a Linux Kernel Engineer, you should know that;-)
* unless you're using suspend to disk, I'm not sure about that.
partitions to the new locations, then update the grub.conf and voila! (I would hope....)
I'm also wondering about complications from having the swap and / partitions inside the extended partition....
At one point I had RHEL Beta 5 Client and Server, SLED and SUSE 10.x on the one box. Might have had FC6 too. The only complication was that Anaconda couldn't handle repartitioning the drive.
On 4/11/07, John Summerfield debian@herakles.homelinux.org wrote:
There is no advantage*, with Linux 2.6 kernels, to having a swap partition over having a swap file. Swap files are more flexible, easier to manage. As a Linux Kernel Engineer, you should know that;-)
- unless you're using suspend to disk, I'm not sure about that.
That's my title - I'm still working my way into it, and I'm learning as fast as I can.
Actually, no, I didn't know that. The last kernel I was familiar with (for about six months) was pre-2.0.
Does that mean (and this applies to another thread along this line that's also going on around here I think) that we don't need a swap partition at all? Is the swap file automatic, or do we have to specify it (yeah, I know, rtfm, but where is t.f.m.?).
Thanks.
mhr
Mark Hull-Richter wrote:
On 4/11/07, John Summerfield debian@herakles.homelinux.org wrote:
There is no advantage*, with Linux 2.6 kernels, to having a swap partition over having a swap file. Swap files are more flexible, easier to manage. As a Linux Kernel Engineer, you should know that;-)
- unless you're using suspend to disk, I'm not sure about that.
That's my title - I'm still working my way into it, and I'm learning as fast as I can.
Actually, no, I didn't know that. The last kernel I was familiar with (for about six months) was pre-2.0.
Does that mean (and this applies to another thread along this line that's also going on around here I think) that we don't need a swap partition at all? Is the swap file automatic, or do we have to specify it (yeah, I know, rtfm, but where is t.f.m.?).
I mostly do not have swap partitions, I do need to create them manually. Typically this: cd /var dd if=/dev/zero of=swapfile bs=$((1*1024*1024)) count=512 mkswap swapfile swapon swapfile
You can (with a luck) do this when you find you need (more) swap.
Then this: [root@ns ~]# grep swap /etc/fstab /var/swapfile swap swap auto [root@ns ~]# so it's on next time.
Note that you can specify priorities, so one swap area's fully used before another is started. This is useful under VM where Linux often swaps to a ramdisk first, then real disk second. One organises alarms to go off to see why the penguin's behaving badly.