Powered by Opensat
Linux/mips 3.5.5-opensat
(none) login: root
# mkdir hdd
# mount -o noatime /dev/sda1 hdd
# mkdir dom
# mount -o noatime /dev/hda1 dom
# cd hdd
# mkdir backup
# cd backup
# mkdir dom
# cd /home/root
# cp -a dom/* hdd/backup/dom/
# umount dom
# echo ",512,83" > hda.out
# echo ",4,83" **** hda.out
# echo ",128,82" **** hda.out
# echo ",,5" **** hda.out
# echo ",,83" **** hda.out
# sfdisk -f -uM /dev/hda < hda.out
Checking that no-one is using this disk right now ...
OK
Disk /dev/hda: 1942 cylinders, 16 heads, 63 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/hda1 0+ 512- 513- 524663+ 83 Linux
/dev/hda2 512+ 516- 5- 4536 83 Linux
/dev/hda3 516+ 645- 129- 131544 82 Linux swap / Solaris
/dev/hda4 645+ 955- 311- 318024 5 Extended
/dev/hda5 645+ 955- 311- 318023+ 83 Linux
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System
/dev/hda1 0+ 512- 513- 524663+ 83 Linux
/dev/hda2 512+ 516- 5- 4536 83 Linux
/dev/hda3 516+ 645- 129- 131544 82 Linux swap / Solaris
/dev/hda4 645+ 955- 311- 318024 5 Extended
/dev/hda5 645+ 955- 311- 318023+ 83 Linux
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
# mkfs.ext3 /dev/hda1 -b 4096 -E stride=96
mke2fs 1.41.12 (17-May-2010)
warning: 93 blocks unused.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=96 blocks, Stripe width=0 blocks
32832 inodes, 131072 blocks
6558 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8208 inodes per group
Superblock backups stored on blocks:
32768, 98304
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mkfs.ext3 /dev/hda2 -b 4096 -E stride=96
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=96 blocks, Stripe width=0 blocks
1152 inodes, 1134 blocks
56 blocks (4.94%) reserved for the super user
First data block=0
1 block group
32768 blocks per group, 32768 fragments per group
1152 inodes per group
Writing inode tables: done
Filesystem too small for a journal
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mkswap /dev/hda3
Setting up swapspace version 1, size = 134696960 bytes
UUID=8a6a44e1-21f0-4504-8400-add6a3bca92e
# mkfs.ext3 /dev/hda5 -b 4096 -E stride=96
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=96 blocks, Stripe width=0 blocks
79584 inodes, 79505 blocks
3975 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=83886080
3 block groups
32768 blocks per group, 32768 fragments per group
26528 inodes per group
Superblock backups stored on blocks:
32768
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# sync
# mount -o noatime /dev/hda1 dom
# cp -a hdd/backup/dom/* dom/
# sync
# umount hdd
# umount dom
# reboot -f