....I'm really ashamed about that, I told it the wrong disk....My bad.... All is working correctly now, a big thanks for your hints.
Here the final steps I did, for anyone else who might be interested : - I forgot to edit my /etc/fstab before rebooting. So my system was mounted as read-only, and couldn't update /etc/fstab - Did mount -uw /dev/sd2a / - Edited fstab to reflect the new duid Thank you very much for your help 2013/5/14 Otto Moerbeek <o...@drijf.net> > On Tue, May 14, 2013 at 03:52:03PM +0200, Adrien wrote: > > > OK, so : > > > > 1. Added new hdd within my virtual machine. > > > > 2. Started virtual machine, initialized the disk with fdisk : > > > > root@bsd:~# fdisk -i sd2 > > Do you wish to write new MBR and partition table? [n] y > > Writing MBR at offset 0. > > > > 3. Added new slice with Disklabel > > root@bsd:~# disklabel -E sd2 > > > > Label editor (enter '?' for help at any prompt) > > > p > > OpenBSD area: 64-16771860; size: 16771796; free: 20 > > # size offset fstype [fsize bsize cpg] > > c: 16777216 0 unused > > k: 16771776 64 4.2BSD 2048 16384 1 > > > > > d k > > > > > a a > > > > > p > > OpenBSD area: 64-16771860; size: 16771796; free: 20 > > # size offset fstype [fsize bsize cpg] > > a: 16771776 64 4.2BSD 2048 16384 1 > > c: 16777216 0 unused > > > > > w > > > q > > > > > > 4. Made new fs to the partition : > > > > root@bsd:/# newfs /dev/rsd2a > > /dev/rsd2a: 8189.3MB in 16771776 sectors of 512 bytes > > 41 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each > > super-block backups (for fsck -b #) at: > > 32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624, > 3317280, > > 3731936, 4146592, 4561248, 4975904, 5390560, > > 5805216, 6219872, 6634528, 7049184, 7463840, 7878496, 8293152, 8707808, > > 9122464, 9537120, 9951776, 10366432, 10781088, > > 11195744, 11610400, 12025056, 12439712, 12854368, 13269024, 13683680, > > 14098336, 14512992, 14927648, 15342304, 15756960, > > 16171616, 16586272, > > > > > > 5. Rebooted in rescue to mount the new partition and copy old root to the > > new partition : > > mount /dev/sd2a /mnt --> New partition > > mount /dev/sd0a /mnt2 --> Old root partition > > > > 6. > > > > Copied everything from old root to the new partition : > > > > (cd /mnt2; tar cf - .) | (cd /mnt; tar xpf -) > > > > 7. Then runned install boot with : > > > > /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2 > > > > 8. My BSD is still booting on hd0 instead of hd1 :( > > Did you tell the bios to boot from the other disk? > > -Otto > > > > > > > 2013/5/14 Otto Moerbeek <o...@drijf.net> > > > > > On Tue, May 14, 2013 at 01:06:27PM +0200, Adrien wrote: > > > > > > > Thanks. > > > > > > > > I have mounted my new hard drive to /mnt. > > > > > > You don't mount hard drives, you mount partititons. > > > > > > Tell us exactly what you did and show command output of fdisk and > > > disklabel. > > > > > > Without that info, we can only guess. > > > > > > -Otto > > > > > > > > > > > Then I ran : > > > > > > > > /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd2 > > > > > > > > Telling me that /boot will be written at sector 64. > > > > > > > > But I'm still booting with my old hdd :( > > > > > > > > Tried to enter boot hd1k:/bsd at boot prompt but it's telling me > that no > > > > such file or directory. Seems my drive is good as during the early > > > > bootstage I have hd0+ (my old hdd) and hd1+ (new hdd). > > > > > > > > Can this be due to the fact my filesystem is currently read-only, as > I > > > have > > > > no more space left on my root partition ? > > > > > > > > > > > > > > > > 2013/5/14 Otto Moerbeek <o...@drijf.net> > > > > > > > > > On Tue, May 14, 2013 at 11:08:49AM +0200, Adrien wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I have added a second hard drive in my virtual machine, as my > root > > > > > > partition is full. My idea was to add a new disk to the system, > then > > > > > > migrate the root partition to the new disk. > > > > > > > > > > > > What I did so far : > > > > > > > > > > > > - In recovery, add the second hard drive, fdisk to initialize it, > > > then > > > > > > disklabel to add a new slice. --> OK > > > > > > > > > > > > - Mounted the new partition, copied everything from root to the > new > > > > > > partition, then changed /etc/fstab to the new disk, as well as > > > > > > /mnt/etc/fstab. > > > > > > > > > > > > But after restart, my system can't boot :( > > > > > > > > > > > > Any hint about that ? > > > > > > > > > > > > I have been able to migrate other partition without any problems, > > > but I > > > > > > guess I'm missing something for the root partition. > > > > > > > > > > man installboot > > > > > > > > > > -Otto