Clonezilla提供了还原时正在使用的磁盘(sfdisk当前使用此dis)


0

我正在尝试自动执行一个clonezilla映像,这是由于说该设备正在使用中,还原失败了

当我输入“ mount”时,/ dev / sda不是列表中的任何软件(并且mdadm也被禁用,也没有使用/ dev / md ...)

如果我手动使用fdisk清除分区,然后运行partprobe我得到

Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.

如果我重新启动,则在鞭打数据后恢复工作。

我在pxelinux.cfg / default上的启动选项是 LABEL Factory Reset KERNEL clonezilla/vmlinuz APPEND initrd=clonezilla/initrd.img username=user boot=live union=aufs noswap noprompt vga=788 keyboard-layouts=NONE locales=en_US.UTF-8 fetch=tftp://10.11.12.1/clonezilla/filesystem.squashfs config quiet ocs_live_run="/home/partimag/restoreGolden.sh" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8 ocs_prerun="mount -t nfs 10.11.12.1:/copos/SystemImages /home/partimag && /home/partimage/fdisk.sh" nomdadm nodmraid noswap

/home/partimage/restoreGolden.sh的内容是 /usr/sbin/ocs-sr -hn1 OP --batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk GoldenImage sda


我想我知道了,nomdadm在基于ubuntu的clonezilla上不起作用,并且我从debian切换到了ubuntu,(/ dev / md127出现了)我要在我的启动脚本中添加mdadm --stop / dev / md127看看它是否可以解决
Tim Holum'2

Answers:


0

我通过编辑clonezilla禁用mdadm解决了主要问题

mkdir /tmp/sqash cp /path/to/filesystem.squashfs /tmp/sqash apt-get install squashfs-tools cd /tmp/squash unsquashfs filesystem.squashfs rm filesystem.squashfs echo "blacklist md_mod" >> squashfs-root/etc/modprobe.d/ocs-live-blacklist.conf echo "blacklist raid1" >> squashfs-root/etc/modprobe.d/ocs-live-blacklist.conf mksquashfs squashfs-root filesystem.squashfs -b 1024k -comp xz -Xbcj x86 -e boot

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.