Top

参考

インストールの準備

HDD バックアップ

/dev/sda1
File system:  FAT32
Device size:  209.7 MB
Space in use:  19.0 MB
Free Space:   190.7 MB
Block size:   512 Byte
Used block :  37060

/dev/sda2
File system:  HFS Plus
Device size:   52.6 GB
Space in use:  15.8 GB
Free Space:    36.9 GB
Block size:   4096 Byte
Used block :  3845379

/dev/sda3
File system:  EXTFS
Device size:  447.1 GB
Space in use: 152.1 GB
Free Space:   295.1 GB
Block size:   4096 Byte
Used block :  37132922

/dev/sda4
File system:  EXTFS
Device size:  500.1 GB
Space in use: 408.7 GB
Free Space:    91.4 GB
Block size:   4096 Byte
Used block :  99775433

ディスク使用容量合計 596GB。

Clonezilla 1.2.12-67 CD で HDD のイメージバックアップを取得。

root@debian:/home/partimag# sh start-backup.sh 
Setting the TERM as linux
*****************************************************.
Clonezilla image dir: /home/partimag
*****************************************************.
Shutting down the Logical Volume Manager
  No volume groups found
  No volume groups found
Finished Shutting down the Logical Volume Manager
Selected device [sda] found!
The selected devices: sda
*****************************************************.
[9;0]Activating the partition info in /proc... done!
Selected device [sda] found!
The selected devices: sda
Searching for data partition(s)...
Excluding busy partition or disk...
Unmouted partitions (including extended or swap): sda1 sda2 sda3 sda4
Collecting info..... done!
Searching for swap partition(s)...
Excluding busy partition or disk...
Unmouted partitions (including extended or swap): sda1 sda2 sda3 sda4
Collecting info..... done!
The data partition to be saved:   sda1 sda2 sda3 sda4
The swap partition to be saved:  
[9;0]Activating the partition info in /proc... done!
Selected device [sda1] found!
Selected device [sda2] found!
Selected device [sda3] found!
Selected device [sda4] found!
The selected devices: sda1 sda2 sda3 sda4
Getting /dev/sda1 info...
Getting /dev/sda2 info...
Getting /dev/sda3 info...
Getting /dev/sda4 info...
*****************************************************.
The following step is to save the hard disk/partition(s) on this machine as an image:
*****************************************************.
Machine: MacBook4,1
sda (1000GB_TOSHIBA_MQ01ABD1_ata-TOSHIBA_MQ01ABD100_Z29LSTMHS)
sda1 (_vfat_EFI(In_TOSHIBA_MQ01ABD1)_ata-TOSHIBA_MQ01ABD100_Z29LSTMHS)
sda2 (_hfsplus(In_TOSHIBA_MQ01ABD1)_ata-TOSHIBA_MQ01ABD100_Z29LSTMHS)
sda3 (_ext4(In_TOSHIBA_MQ01ABD1)_ata-TOSHIBA_MQ01ABD100_Z29LSTMHS)
sda4 (_ext4(In_TOSHIBA_MQ01ABD1)_ata-TOSHIBA_MQ01ABD100_Z29LSTMHS)
*****************************************************.
-> "/home/partimag/2014-11-19-00-img".
Are you sure you want to continue? ? (y/n) y
OK, let's do it!!
Shutting down the Logical Volume Manager
  No volume groups found
  No volume groups found
Finished Shutting down the Logical Volume Manager
Checking the integrity of partition table in the disk /dev/sda... 
The partition table in this disk is illegal/invalid: /dev/sda
It's not supported by parted. Parted is used in Clonezilla to parse the filesystem in the partition table. This partition table is detected as WRONG by parted!
The error messages from parted are:
*****************************************************.
Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Error during translation: Invalid or incomplete multibyte or wide character
*****************************************************.
If you continue, something strange might happen (E.g. dd is used, not partimage or ntfsclone, to save the supported file system), and the image you saved maybe not be complete!
Are you sure you want to continue? ? (y/N) y
Very bad choice!
OK, let's do it!!
Reading the partition table for /dev/sda...RETVAL=0
*****************************************************.
Saving the primary GPT of sda as /home/partimag/2014-11-19-00-img/sda-gpt-1st by dd...
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.0216014 s, 806 kB/s
*****************************************************.
Saving the secondary GPT of sda as /home/partimag/2014-11-19-00-img/sda-gpt-2nd by dd...
32+0 records in
32+0 records out
16384 bytes (16 kB) copied, 0.0206755 s, 792 kB/s
*****************************************************.
Saving the GPT of sda as /home/partimag/2014-11-19-00-img/sda-gpt.gdisk by gdisk...
The operation has completed successfully.
*****************************************************.
done!
Saving the MBR data for sda...
1+0 records in
1+0 records out
512 bytes (512 B) copied, 3.1289e-05 s, 16.4 MB/s
*****************************************************.
*****************************************************.
Running file system check and repair for /dev/sda1...
Running: fsck -f  /dev/sda1
fsck from util-linux 2.20.1
dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
/dev/sda1: 5 files, 30726/403266 clusters
*****************************************************.
Starting saving /dev/sda1 as /home/partimag/2014-11-19-00-img/sda1.XXX...
/dev/sda1 filesystem: vfat.
*****************************************************.
Checking the disk space... 
*****************************************************.
Use partclone with pigz to save the image.
Image file will be split with size limit 20000 MB.
*****************************************************.
If this action fails or hangs, check:
* Is the disk full ?
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to clone device (/dev/sda1) to image (-)
Reading Super Block
Elapsed: 00:00:01, Remaining: 00:00:00, Completed: 100.00%                      
Total Time: 00:00:01, 100.00% completed!
done!
File system:  FAT32
Device size:  209.7 MB
Space in use:  19.0 MB
Free Space:   190.7 MB
Block size:   512 Byte
Used block :  37060
Elapsed: 00:00:02, Remaining: 00:00:00, Completed: 100.00%, Rate: 569.24MB/min, 
current block:     409600, total block:     409600, Complete: 100.00%           
Total Time: 00:00:02, Ave. Rate:  569.2MB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/sda1) to the image (-)
Checking the disk space... 
>>> Time elapsed: 3.11 secs (~ .051 mins)
*****************************************************.
Finished saving /dev/sda1 as /home/partimag/2014-11-19-00-img/sda1.vfat-ptcl-img.gz
*****************************************************.
*****************************************************.
*****************************************************.
Running file system check and repair for /dev/sda2...
Running: fsck -f  /dev/sda2
fsck from util-linux 2.20.1
** /dev/sda2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Macintosh_HD appears to be OK.
*****************************************************.
Starting saving /dev/sda2 as /home/partimag/2014-11-19-00-img/sda2.XXX...
/dev/sda2 filesystem: hfsplus.
*****************************************************.
Checking the disk space... 
*****************************************************.
Use partclone with pigz to save the image.
Image file will be split with size limit 20000 MB.
*****************************************************.
If this action fails or hangs, check:
* Is the disk full ?
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to clone device (/dev/sda2) to image (-)
Reading Super Block
Elapsed: 00:00:08, Remaining: 00:00:00, Completed: 100.00%                      
Total Time: 00:00:08, 100.00% completed!
done!
File system:  HFS Plus
Device size:   52.6 GB
Space in use:  15.8 GB
Free Space:    36.9 GB
Block size:   4096 Byte
Used block :  3845379
Elapsed: 00:07:34, Remaining: 00:00:00, Completed: 100.00%, Rate:   2.08GB/min, 
current block:   12845056, total block:   12845056, Complete: 100.00%           
Total Time: 00:07:34, Ave. Rate:    2.1GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/sda2) to the image (-)
Checking the disk space... 
>>> Time elapsed: 465.10 secs (~ 7.751 mins)
*****************************************************.
Finished saving /dev/sda2 as /home/partimag/2014-11-19-00-img/sda2.hfsplus-ptcl-img.gz
*****************************************************.
*****************************************************.
*****************************************************.
Running file system check and repair for /dev/sda3...
Running: fsck -f  /dev/sda3
fsck from util-linux 2.20.1
e2fsck 1.42.4 (12-Jun-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda3: 2191630/27295744 files (0.1% non-contiguous), 37132922/109167360 blocks
*****************************************************.
Starting saving /dev/sda3 as /home/partimag/2014-11-19-00-img/sda3.XXX...
/dev/sda3 filesystem: ext4.
*****************************************************.
Checking the disk space... 
*****************************************************.
Use partclone with pigz to save the image.
Image file will be split with size limit 20000 MB.
*****************************************************.
If this action fails or hangs, check:
* Is the disk full ?
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to clone device (/dev/sda3) to image (-)
Reading Super Block
Elapsed: 00:01:36, Remaining: 00:00:00, Completed: 100.00%                      
Total Time: 00:01:36, 100.00% completed!
done!
File system:  EXTFS
Device size:  447.1 GB
Space in use: 152.1 GB
Free Space:   295.1 GB
Block size:   4096 Byte
Used block :  37132922
Elapsed: 00:58:04, Remaining: 00:00:00, Completed: 100.00%, Rate:   2.62GB/min, 
current block:  109167360, total block:  109167360, Complete: 100.00%           
Total Time: 00:58:04, Ave. Rate:    2.6GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/sda3) to the image (-)
Checking the disk space... 
>>> Time elapsed: 3590.62 secs (~ 59.843 mins)
*****************************************************.
Finished saving /dev/sda3 as /home/partimag/2014-11-19-00-img/sda3.ext4-ptcl-img.gz
*****************************************************.
*****************************************************.
*****************************************************.
Running file system check and repair for /dev/sda4...
Running: fsck -f  /dev/sda4
fsck from util-linux 2.20.1
e2fsck 1.42.4 (12-Jun-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
DATA: 1804534/30583008 files (0.3% non-contiguous), 99775433/122093568 blocks
*****************************************************.
Starting saving /dev/sda4 as /home/partimag/2014-11-19-00-img/sda4.XXX...
/dev/sda4 filesystem: ext4.
*****************************************************.
Checking the disk space... 
*****************************************************.
Use partclone with pigz to save the image.
Image file will be split with size limit 20000 MB.
*****************************************************.
If this action fails or hangs, check:
* Is the disk full ?
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to clone device (/dev/sda4) to image (-)
Reading Super Block
Elapsed: 00:01:40, Remaining: 00:00:00, Completed: 100.00%                      
Total Time: 00:01:40, 100.00% completed!
done!
File system:  EXTFS
Device size:  500.1 GB
Space in use: 408.7 GB
Free Space:    91.4 GB
Block size:   4096 Byte
Used block :  99775433
Elapsed: 03:03:24, Remaining: 00:00:00, Completed: 100.00%, Rate:   2.23GB/min, 
current block:  122093568, total block:  122093568, Complete: 100.00%           
Total Time: 03:03:24, Ave. Rate:    2.2GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully cloned the device (/dev/sda4) to the image (-)
Checking the disk space... 
>>> Time elapsed: 11108.04 secs (~ 185.134 mins)
*****************************************************.
Finished saving /dev/sda4 as /home/partimag/2014-11-19-00-img/sda4.ext4-ptcl-img.gz
*****************************************************.
Saving hardware info by lshw...
Saving DMI info...        
Saving PCI info...
Saving package info...
*****************************************************.
This image was saved successfully: 2014-11-19-00-img
Start checking the saved image 2014-11-19-00-img if restorable...
Setting the TERM as linux
The image to be checked: 2014-11-19-00-img
This is a whole disk image, saved from harddrive: sda
The partition to be checked: sda1 sda2 sda3 sda4
[9;0]*****************************************************.
Checking the partition table in the image "2014-11-19-00-img"...
GPT 1st partition table file found!
GPT 2nd partition table file found!
GPT partition table file saved by gdisk found!
*****************************************************.
Checking the swap partition info in the image "2014-11-19-00-img"...
Finding swap partition(s) in GPT table /home/partimag/2014-11-19-00-img/sda-pt.parted...
*****************************************************.
Checking the MBR in the image "2014-11-19-00-img"...
MBR file found!
*****************************************************.
Checking the partition sda1 in the image "2014-11-19-00-img"...
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to check image (-)
Calculating bitmap... Please wait... done!
File system:  FAT32
Device size:  209.7 MB
Space in use:  19.0 MB
Free Space:   190.7 MB
Block size:   512 Byte
Used block :  37060
Elapsed: 00:00:01, Remaining: 00:00:00, Completed: 100.00%, Rate:   1.14GB/min, 
current block:     409600, total block:     409600, Complete: 100.00%           
Total Time: 00:00:01, Ave. Rate:    1.1GB/min, 100.00% completed!
Partclone successfully checked the image (-)
Checked successfully.
This partition in the image is restorable: sda1
*****************************************************.
Checking the partition sda2 in the image "2014-11-19-00-img"...
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to check image (-)
Calculating bitmap... Please wait... done!
File system:  HFS Plus
Device size:   52.6 GB
Space in use:  15.8 GB
Free Space:    36.9 GB
Block size:   4096 Byte
Used block :  3845379
Elapsed: 00:05:41, Remaining: 00:00:00, Completed: 100.00%, Rate:   2.77GB/min, 
current block:   12845056, total block:   12845056, Complete: 100.00%           
Total Time: 00:05:41, Ave. Rate:    2.8GB/min, 100.00% completed!
Partclone successfully checked the image (-)
Checked successfully.
This partition in the image is restorable: sda2
*****************************************************.
Checking the partition sda3 in the image "2014-11-19-00-img"...
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to check image (-)
Calculating bitmap... Please wait... done!
File system:  EXTFS
Device size:  447.1 GB
Space in use: 152.1 GB
Free Space:   295.1 GB
Block size:   4096 Byte
Used block :  37132922
Elapsed: 00:41:37, Remaining: 00:00:00, Completed: 100.00%, Rate:   3.65GB/min, 
current block:  109167360, total block:  109167360, Complete: 100.00%           
Total Time: 00:41:37, Ave. Rate:    3.7GB/min, 100.00% completed!
Partclone successfully checked the image (-)
Checked successfully.
This partition in the image is restorable: sda3
*****************************************************.
Checking the partition sda4 in the image "2014-11-19-00-img"...
*****************************************************.
Partclone v0.2.49 http://partclone.org
Starting to check image (-)
Calculating bitmap... Please wait... done!
File system:  EXTFS
Device size:  500.1 GB
Space in use: 408.7 GB
Free Space:    91.4 GB
Block size:   4096 Byte
Used block :  99775433
Elapsed: 02:01:18, Remaining: 00:00:00, Completed: 100.00%, Rate:   3.37GB/min, 
current block:  122093568, total block:  122093568, Complete: 100.00%           
Total Time: 02:01:18, Ave. Rate:    3.4GB/min, 100.00% completed!
Partclone successfully checked the image (-)
Checked successfully.
This partition in the image is restorable: sda4
*****************************************************.
All the images of partition or LV devices in this image were checked and they are restorable: 2014-11-19-00-img
*****************************************************
*****************************************************
This program is not started by Clonezilla server, so skip notifying it the job is done.
Finished!
Now syncing - flush filesystem buffers...

約7時間半。

バックアップファイル 259G。

パーティション

Lubunut 14.04 desktop i386 CD で起動。

GParted で /dev/sda3 を削除。しかし、インストールが「インストール準備」から先に進まない。

/dev/sda4 も削除して以下のようにしてみても同じ。

gparted-1.png

ログを見ると、以下のエラー。

lubuntu@lubuntu:~$ cat /var/log/installer/debug 
Ubiquity 2.18.8
Gtk-Message: Failed to load module "overlay-scrollbar"

(ubiquity:3826): Gtk-CRITICAL **: gtk_radio_button_set_group: assertion '!g_slist_find (group, radio_button)' failed

(ubiquity:3826): Gtk-CRITICAL **: gtk_radio_button_set_group: assertion '!g_slist_find (group, radio_button)' failed
update_release_notes_label()
update_release_notes_label()
Exception caught in process_line:
Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/filteredcommand.py", line 145, in process_line
    return self.dbfilter.process_line()
  File "/usr/lib/ubiquity/ubiquity/debconffilter.py", line 287, in process_line
    if not input_widgets[0].run(priority, question):
  File "/usr/lib/ubiquity/plugins/ubi-partman.py", line 2318, in run
    for partition in parted.partitions():
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 206, in partitions
    self.open_dialog('PARTITIONS')
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 141, in open_dialog
    self.error_handler()
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 112, in error_handler
    exception_type = self.read_line()[0]
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 74, in read_line
    line = self.outf.readline().rstrip('\n')
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 181: invalid continuation byte
Exception ignored in: <bound method PartedServer.__del__ of <ubiquity.parted_server.PartedServer object at 0xb5267d4c>>
Traceback (most recent call last):
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 62, in __del__
    self.close_dialog()
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 148, in close_dialog
    self.sync_server()
  File "/usr/lib/ubiquity/ubiquity/parted_server.py", line 132, in sync_server
    with open(stopfifo, 'w'):
PermissionError: [Errno 13] Permission denied: '/var/lib/partman/stopfifo'

仕方がないので、パーティションテーブルを gpt から msdos に変更した。

gparted-2.png

インストール

パーティションテーブルを msdos にしたら、インストールが最後まで行けた。

インストール直後。

kenji@kenji-MacBook:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       913G  2.7G  864G   1% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           400M  1.2M  399M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M   36K  100M   1% /run/user

kenji@kenji-MacBook:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          3999       1885       2113         45        150       1312
-/+ buffers/cache:        423       3576
Swap:         4059          0       4059

Lubuntu 14.04 の設定

HDD リストア

$ sudo apt-get install partclone

/home パーティション


$ time sudo sh -c "cat /media/kenji/WDC2TB/2014-11-19-00-img/sda4.ext4-ptcl-img.gz.* | gzip -d -c | partclone.restore -C -s - -o sda4.img"

Partclone v0.2.51 http://partclone.org
Starting to restore image (-) to device (sda4.img)
Calculating bitmap... Please wait... done!
File system:  EXTFS
Device size:  500.1 GB = 122093568 Blocks
Space in use: 408.7 GB = 99775433 Blocks
Free Space:    91.4 GB = 22318135 Blocks
Block size:   4096 Byte
Elapsed: 01:50:17, Remaining: 00:00:00, Completed: 100.00%, Rate:   3.71GB/min, 
current block:  122093568, total block:  122093568, Complete: 100.00%           
Total Time: 01:50:17, Ave. Rate:    3.7GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully restored the image (-) to the device (sda4.img)
Cloned successfully.

real	110m19.087s
user	117m28.204s
sys	24m52.732s
$ sudo mount -o loop sda4.img /mnt
kenji@kenji-MacBook:/mnt/kenji$ cp -pr .gnupg/ ~/
kenji@kenji-MacBook:/mnt/kenji$ cp -pr .ssh/ ~/
kenji@kenji-MacBook:/mnt/kenji$ cp -pr .mozilla/ ~/
kenji@kenji-MacBook:/mnt/kenji$ cp -pr bin/ ~/
$ rsync -av /mnt/kenji/ OLD/kenji

※ユーザ権限で rsync したため、root で作成したバックアップファイルがコピーできていなかった!

必要なファイルを新しい home に移動。

/ パーティション


$ time sudo sh -c "cat /media/kenji/WDC2TB/2014-11-19-00-img/sda3.ext4-ptcl-img.gz.* | gzip -d -c | partclone.restore -C -s - -o sda3.img"

Partclone v0.2.51 http://partclone.org
Starting to restore image (-) to device (sda3.img)
Calculating bitmap... Please wait... done!
File system:  EXTFS
Device size:  447.1 GB = 109167360 Blocks
Space in use: 152.1 GB = 37132922 Blocks
Free Space:   295.1 GB = 72034438 Blocks
Block size:   4096 Byte
Elapsed: 00:41:23, Remaining: 00:00:00, Completed: 100.00%, Rate:   3.68GB/min, 
current block:  109167360, total block:  109167360, Complete: 100.00%           
Total Time: 00:41:23, Ave. Rate:    3.7GB/min, 100.00% completed!
Syncing... OK!
Partclone successfully restored the image (-) to the device (sda3.img)
Cloned successfully.

real	41m26.664s
user	42m8.432s
sys	9m2.108s

$ dmesg | tail -1
[12684.912529] EXT4-fs (loop0): bad geometry: block count 109167360 exceeds size of device (109053984 blocks)
$ sudo truncate -o -s 109167360 sda3.img
$ sudo mount -o loop sda3.img /mnt

GRUB の再インストール

起動時にホワイトスクリーンのまま時間がかかる、GRUB のメニューが出ない、ので念のため GRUB を再インストールしてみる。

kenji@kenji-MacBook:~$ sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
kenji@kenji-MacBook:~$ sudo grub-install --recheck /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.

しかし、とくに変化はなかった。

参照: https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation

Mac OS X Snow Leopard の DVD で起動して、「ユーティリティー」→「ターミナル」。

# bless --device /dev/disk0s2 --setBoot --legacy


添付ファイル: filegparted-2.png 707件 [詳細] filegparted-1.png 712件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2014-11-21 (金) 17:18:21 (3451d)