You are not logged in.

#1 2009-07-19 20:07:02

algorythm
Member
From: /usr/share/zoneinfo/Europe/FIN
Registered: 2009-07-17
Posts: 181

[Solved] Merging boot with root

Hi,

So the job is to merge my Arch's /boot partition with /root.
I have 4 primary partitions; arch /boot (sda1), ubuntu (sda2), arch / (sda3) and Vista (sda4), as you can see with fdisk:

[det@myhost Shortcuts]$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf020b972

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          24      192748+  83  Linux
/dev/sda2            5111       15386    82541970   83  Linux
/dev/sda3           15387       29332   112021245   83  Linux
/dev/sda4   *       29333       60801   252774742+   7  HPFS/NTFS

Also here's what GParted has to say:

gparted.png


Thanks for everyone smile.

Last edited by algorythm (2009-07-24 11:52:08)


“Talent you can bloom. Instinct you can polish.”  — Haikyuu!! (adapted)
“If everybody thought alike, no one would be thinking very much.”  — Walter Lippmann (adapted)
“The important thing is to be able, at any moment, to sacrifice what we are for what we could become.”  — Charles Dubois

Offline

#2 2009-07-19 20:54:33

ZeroTruths
Member
Registered: 2009-07-02
Posts: 77

Re: [Solved] Merging boot with root

What I would do:
* Boot into a livedisk
* Shrink sda4
* Move sda2 into this newly freed space
* Copy the data that's in sda1 into sda3 (using a filemanager, not gparted)
* Once the data is copied, delete sda1
* Move sda3 to the front of the partition
* Remount sda3, and edit both /etc/fstab and /boot/grub/menu.lst to reflect the changes (/boot is now in sda3, not sda1)
* (Optional) Use the extra space to regrow sda4 back to its original size

Hope this helped. smile

Offline

#3 2009-07-19 20:56:45

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: [Solved] Merging boot with root

# as root, copy contents of boot to a temporary dir
mkdir /tmp/boot
cp /boot /tmp/boot -r

# umount the boot partition
umount /boot

# move (or copy) the contents back into the boot directory
mv /tmp/boot/* /boot/

# remove the line from fstab that mounts the boot partition
vim /etc/fstab     # click...clack

After this, you can freely delete the boot partition with gparted.

.]

Offline

#4 2009-07-24 11:51:04

algorythm
Member
From: /usr/share/zoneinfo/Europe/FIN
Registered: 2009-07-17
Posts: 181

Re: [Solved] Merging boot with root

Yeah thanks, but you guys didn't probably remember that moving /boot also requires reconfiguring grub (/boot/grub/menu.lst).

So what I did:

Old menu.lst

title  Arch Linux
rootnoverify   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /kernel26.img

title  Arch Linux Fallback
rootnoverify   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /kernel26-fallback.img

New menu.lst

title  Arch Linux
rootnoverify   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /boot/kernel26.img

title  Arch Linux Fallback
rootnoverify   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /boot/kernel26-fallback.img

Last edited by algorythm (2009-07-24 12:06:28)


“Talent you can bloom. Instinct you can polish.”  — Haikyuu!! (adapted)
“If everybody thought alike, no one would be thinking very much.”  — Walter Lippmann (adapted)
“The important thing is to be able, at any moment, to sacrifice what we are for what we could become.”  — Charles Dubois

Offline

Board footer

Powered by FluxBB