Klno disku pod FreeBSD
Indigo
indigo at eiecon.net
Wed Jan 28 15:15:40 CET 2009
Vzhledem k tomu ze moje aktualni instalace FreeBSD uz prezila ctyri
presunuti vsech filesystemu na ruzne velike disky, nabizim svoje poznamky:
# Overwrite the first kilobyte of the dedicated disk
dd if=/dev/zero of=/dev/da1 bs=1k count=1
# Write default label and boot code
bsdlabel -Bw da1 auto
# Edit the label - Blocks are 512B
bsdlabel -e da1
# a root - 1GB = 2097152 offset 16
# b swap - 2GB = 4194304 offset 2097168
# c all - DO NOT TOUCH
# d var - 5GB = 10485760 offset 6291472
# e tmp - 2GB = 4194304 offset 16777232
# f usr - * = c.size-20971536 offset 20971536
newfs -L root -U /dev/da1a
newfs -L var -U /dev/da1d
newfs -L tmp -U /dev/da1e
newfs -L usr -U /dev/da1f
# Mount the filesystems under /mnt/{root|usr|var|tmp}
#Run the following script
#!/bin/sh
( dump -0f - / ) | ( cd /mnt/root ; restore -rf - )
( dump -0f - /var ) | ( cd /mnt/var ; restore -rf - )
( dump -0f - /usr ) | ( cd /mnt/usr ; restore -rf - )
( dump -0f - /tmp ) | ( cd /mnt/tmp ; restore -rf - )
# Fix /mnt/root/etc/fstab - !!! use the labels !!!
# Boot from the new drive
Asi by nebylo prilis tezke to rozchodit i pres sit.
V.
More information about the Users-l
mailing list