You are not logged in.
I moved from Debian to Arch. To keep GRUB and whatnot, I made Debian my /boot partition. As such my kernel is /boot/vmlinuz26 and my GRUB directory is actually /boot/boot/grub if that helps illustrate the situation here.
I'm now ready to get rid of Debian; Arch is just much nicer in almost every way (although I keep typing apt-get when I go to install packages!).
So here's the situation, and I'm not quite sure just how to work this out in a proper, clean way. Debian needs to go and /boot should preferably be moved to Arch. I have backed up my GRUB directory, kernel and initrd image on an external drive.
My Arch installation is nicely set up now, and I don't particularly want to start the whole process again so I'm just looking for some guidance is performing the /boot move. I'd probably end up breaking something.
Thanks in advance.
Last edited by TheJoe (2009-12-30 01:07:37)
Offline
As such my kernel is /boot/vmlinuz26 and my GRUB directory is actually /boot/boot/grub if that helps illustrate the situation here.
This says nothing unless you show your "/etc/fstab". You should think of partitions, not directories. And GRUB and Linux have different naming conventions for partitions. You did not tell, do you want a separate boot partition, about your partitions, so I can not give a concrete advice.
In general, to move data that is needed on boot you need to keep in mind these things:
* setup GRUB such that it can find the directory with *stage* files;
* edit GRUB's "menu.lst" such that it points to the kernel, initrd and a partition with OS files;
* edit "/etc/fstab" to mount /boot directory with the kernel, initrd.
You can just copy kernel and such to the new place (though OS directories need a special care). Prepare a live CD for repairing if you'd make a mistake. Check that it can write to file systems you use (e.g. an old live CD can not write to ext4) before you change anything.
Last edited by beroal (2009-12-29 19:01:59)
we are not condemned to write ugly code
Offline
In addition to your /etc/fstab it would be nice to see your menu.lst.
I think this should be a relatively easy matter of simply cp'ing a few files, editing menu.lst and then wiping the Debian partition and putting it to use for other purposes. But without knowing the details of your setup, it's difficult to tell exactly.
Offline
Ok sorry, here's some more info:
/etc/fstab:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
/dev/sda2 /boot ext3 defaults 0 1 #Note: this is Debian
/dev/sda4 / ext4 defaults 0 1
/dev/sda5 swap swap defaults 0 0
# Stupid automounts
/dev/sda1 /media/extra ntfs-3g defaults 0 0
/dev/sdc1 /media/megadisk ntfs-3g defaults 0 0 #TODO: Actually make this work
And here's my menu.lst (I've only included the boot section, if you actually need the rest tell me and I will provide)
title Arch Linux
root (hd0,1)
kernel /vmlinuz26 root=/dev/sda4 ro quiet vga=791
initrd /kernel26.img
title Microsoft Windows 7 Ultimate x64
root (hd1,1)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
title ----------------------------------------------------
root
title Weird Shit
root
title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,1)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet vga=791
initrd /boot/initrd.img-2.6.26-2-686
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro single
initrd /boot/initrd.img-2.6.26-2-686
Offline
Okay, looks good. Now what is your /dev/sda2 partition? Is it just the /boot partition of Debian or the whole root partition of the system? How big is it? If it contains the whole Debian, I guess you would want to split it up into two partitions -- one small for your Arch /boot, and the other one, bigger, to use for some data -- right?
Offline
If you want OS and kernel in a single partition:
* copy kernel, initrd to /boot of sda4;
* setup GRUB to /boot/grub of sda4;
* "menu.lst":
title Arch Linux
root (hd0,3)
kernel /boot/vmlinuz26 root=/dev/sda4 ro quiet vga=791
initrd /boot/kernel26.img
we are not condemned to write ugly code
Offline
Okay, looks good. Now what is your /dev/sda2 partition? Is it just the /boot partition of Debian or the whole root partition of the system? How big is it? If it contains the whole Debian, I guess you would want to split it up into two partitions -- one small for your Arch /boot, and the other one, bigger, to use for some data -- right?
/dev/sda2 is both /boot AND Debian. It's the entire system. It's 46GB in total.
beroal: That's wonderful, thank you. I'll give it a go and hope for the best.
Then there's just the fun of giving that 46GB back to Arch. I might just finish reading this book tonight ^_^
If it does fail, I'll just see it as an excuse to clean my PC up a little.
Edit:
The move was successful, and increasing the partition's size was much snappier than I expected.
Thanks guys!
Last edited by TheJoe (2009-12-30 01:07:22)
Offline
The move was successful, and increasing the partition's size was much snappier than I expected.
You are lucky, I increased and moved NTFS partition for ~8 hours (SATA2 HDD).
we are not condemned to write ugly code
Offline