> fastmem > 日誌 > 我的日誌 > [EeePC] eee pc disk image

帳號: fastmem

暱稱: fastmem

我的書籤

沒有資料

日誌月曆
載入月曆中..
廣告看板

[EeePC] vgatest » « [EeePC] eee701dvd.iso

2007/11/07 [EeePC] eee pc disk image
Disk /dev/sda: 4001 MB, 4001292288 bytes



# fdisk -ul
Disk /dev/sda: 4001 MB, 4001292288 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7815024 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     4819499     2409718+  83  Linux
/dev/sda2         4819500     7775459     1477980   83  Linux
/dev/sda3         7775460     7791524        8032+   c  W95 FAT32 (LBA)
/dev/sda4         7791525     7807589        8032+  ef  EFI (FAT-12/16/32)

/dev/sda1 系統區 (ro, hide in unionfs)
/dev/sda2 資料區 (rw)
/dev/sda3 BIOS update tmp. (for linux)
/dev/sda4 EFI (more bios support code, eee pc use it?)


# dd if=/dev/sda of=sda5.img bs=512 skip=7807589 count=7436
# dd if=/dev/sda of=sdambr.img bs=512 count=64
# dd if=/dev/sda4 of=sda4.img bs=512 count=16066
# dd if=/dev/sda3 of=sda3.img bs=512 count=16066

# ls -la
-rw-r--r--  1 nobody nogroup  8225280 Oct 27 00:15 sda3.img
-rw-r--r--  1 nobody nogroup  8225280 Oct 26 23:49 sda4.img
-rw-r--r--  1 nobody nogroup  3806720 Oct 26 23:33 sda5.img
-rw-r--r--  1 nobody nogroup    32768 Oct 26 23:35 sdambr.img

# 3717K 的 sda5 是可以藏資料的區域。
# /dev/sda4 16065*512 = 8225280

# /dev/sda1 用 partimage 備分
# /dev/sda2 用 tar 備分.

# /tmp/partimage -z1 -V 700 save /dev/sda1 eee_sda1
# ls -lad eee*
-rw-r--r-- 1 root root 734002124 Oct 26 00:31 eee_sda1.000
-rw-r--r-- 1 root root 189144134 Oct 26 00:53 eee_sda1.001

# /tmp/partimage -z1 -V 700000 save /dev/sda1 eee_sda1.img.gz
# mv eee_sda1.img.gz.000 eee_sda1.img.gz.000.gz
# /tmp/partimage -g 10 imginfo eee_sda1.img.gz.000.gz
# knoppix 的 partimage 有 bug? 要加 -g 10, 否則常 read fail.
# ls -lad eee*
-rwxrwxrwx 1 root root 923152100 Oct 25 03:13 eee_sda1.img.gz.000.gz

# dd if=/dev/zero of=myall.img bs=512 count=5076544
# /sbin/losetup -o 32256 /dev/loop5 myall.img
# partimage -g 10 restore /dev/loop5 eee_sda1.img.gz.000.gz
# losetup -d /dev/loop5

# cat mountmy.sh
mkdir -p /eee
/sbin/losetup -o 32256 /dev/loop6 myall.img
mount -o ro /dev/loop6 /eee

mkdir -p /eeeram
mount -t tmpfs none /eeeram

(cd /; tar zxvf /s4/eee/eeeram.tgz)

mkdir -p /go
# mount -t unionfs -o dirs=/eeeram=rw:/eee=ro unionfs /go
mount -t aufs -o dirs=/eeeram=rw:/eee=ro unionfs /go

# /dev/loop6             2371820   2151776     99560  96% /eee
# none                   1005168         8   1005160   1% /eeeram
# unionfs                1005168         8   1005160   1% /go

# /dev/loop6             2371820   2151776     99560  96% /eee
# none                   1005168     11844    993324   2% /eeeram
# unionfs                1005168     11844    993324   2% /go

# chroot /go

# tiny:/> sh myinit.sh
# mount -t devpts none /dev/pts
# tiny:/> startx

# startx work when not mount /proc
# X -configure first.
# put config file to /etc/X11/xorg.conf


====
# / is ttylinux, ramdisk
# /hd is stanix
# /hd2 is knoppix
# /hd2/go is eee pc disk image in my pc.
# this post is run by firefox in /hd2/go.
# uname -a
Linux tiny.local 2.6.21.2-rc1 #1 PREEMPT
Wed May 23 17:23:01 CST 2007 i686 GNU/Linux

root@tiny ~ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/ram0                15491      4418     10273  30% /
/dev/sda3              1929100   1926564      2536 100% /s3
/dev/cloop             1842954   1842954         0 100% /hd/KNOPPIX
none                   1005168        40   1005128   0% /hd/ramdisk
/hd/UNIONFS            1005168        40   1005128   0% /hd/UNIONFS
/dev/sda4             73804984  73205824    599160  99% /hd/s4
/dev/cloop1            1997852   1997852         0 100% /hd2/KNOPPIX
none                   1005168      5332    999836   1% /hd2/ramdisk
/hd2/UNIONFS           1005168      5332    999836   1% /hd2/UNIONFS
/dev/sda3              1929100   1926564      2536 100% /hd2/s3
/dev/sda4             73804984  73205824    599160  99% /hd2/s4
/dev/sda2             68155760  67745808    409952  99% /hd2/d
/dev/sda1             15735632  11418972   4316660  73% /hd2/c
/dev/loop6             2371820   2151776     99560  96% /hd2/eee
none                   1005168     44064    961104   4% /hd2/eeeram
unionfs                1005168     44064    961104   4% /hd2/go
none                   1800000    716468   1083532  40% /hd2/UNIONFS/dev/shm
/dev/loop0             1418700   1418700         0 100% /hd2/dvd
/dev/loop3             2498348   2191940    179500  92% /hd2/e00
/dev/sda4             73804984  73205824    599160  99% /hd2/go/s4

# fdisk -lu /dev/sda

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders, total 321672960 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    31471334    15735636    7  HPFS/NTFS
/dev/sda2        31471335   167782859    68155762+   7  HPFS/NTFS
/dev/sda3       167782860   171702719     1959930   83  Linux
/dev/sda4       171702720   321669494    74983387+  83  Linux

標籤:
12:09 [ 我的日誌 / 本日人氣 (0) / 累積人氣 (932) / 文章引用 (0) / 發表意見 ]  
文章引用
站內引用 / 引用網址: http://api.mw.net.tw/trackback.php?aid=71114&c=cc8474 複製
訪客留言
是不是可以用你這個 vm eeepc ?
2007-12-02 23:37:03