Moving to larger hard disk

Freebsd 9.X is installed on a SPARC system. Everything is going fine but I want to move the boot drive to a larger boot drive(18GB ==> 300GB).

Code:
[CMD]gpart create -s gpt da1[/CMD]
da1 created
Code:
[CMD]gpart add -t freebsd-boot -l gpboot -b 40 -s 512K da0[/CMD]
da1p1 added
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da1

But pmbr and gptboot do not exist in /boot. Only boot1 and zfsboot. I noticed my x86 freebsd FreeBSD box does have pmbr and gptboot in the /boot directory. Is there something missing because of a SPARC install?

Any advice?

Bill
 
Code:
[cmd]# gpart show [/cmd]
=>       0  35343000  da0  VTOC8  (16G)
         0  33543720    1  freebsd-ufs  (16G)
  33543720   1751085    2  freebsd-swap  (855M)
  35294805     48195       - free -  (23M)

=>       34  585937433  da1  GPT  (279G)
         34          6       - free -  (3.0k)
         40       1024    1  freebsd-boot  (512k)
       1064  585936403       - free -  (279G)
 
Yes, it wants VTOC8. Unfortunately, I know nothing more about VTOC8 than that it exists. gpart can create the same type of disk:
Code:
# gpart destroy -F da1
# gpart create -s vtoc8 da1
# gpart add -t freebsd-ufs -s 275g da1
# gpart add -t freebsd-swap da1

Untested, of course. That may not boot, depending on how the SPARC systems handle bootcode. Come to think of it, you may not be booting from da0, either.
 
I found some posts that used the above commands after you mentioned VTOC8. Also found sunlabel. We will see if this works.
 
Thanks @wblock@, you set me on the correct path.

I am listing the steps I took for future reference, and if I made a mistake please let me know.

First, I removed any partition information using sysinstall

Code:
sunlabel -B da1
gpart destroy -F da1
gpart create -s vtoc8 da1
gpart add -s 50G -t freebsd-ufs /dev/da1
gpart add -s 1G -t freebsd-swap /dev/da1
gpart add -t freebsd-zfs /dev/da1
mkdir /bill
newfs -m 0 /dev/da1a
mount /dev/da1a /bill
( dump -0f - / ) | ( cd /bill ; restore -rf - )
It was on a live system, not recommended, but nothing was happening on this system. The dump took a[]while, I then shutdown. I removed the 18 GB drive and replaced it with the 300 GB drive. It booted and so far everything looks good.
 
Last edited by a moderator:
Back
Top