Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

sh/bash/dash/ksh/zsh等Shell脚本
回复
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V1.2,备份你的 ubuntu 为可启动的 squashfs 文件

#151

帖子 billbear » 2009-11-04 17:34

smallapple 写了:
wangdu2002 写了:熊哥的判断是正确的,只把uuid那一行注释掉,就可以在哥伦布选单直接进XP了。 :em11
这两天看了grub的论坛,发现这个search .... UUID 的问题 还真不少,兼容性的问题还是挺麻烦。
有的说是 --no-floppy 的问题 ,据说把 --no-floppy去掉就可以了。
今天弄个把search .....去掉的办法

sudo gedit /usr/lib/grub/grub-mkconfig_lib
找到173-175行
if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
fi
前面全部加#注释掉,记住从 if 开始到 fi结束,以防止语法错误
# if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
# echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
# fi
然后
sudo update-grub
这样重建出来的 grub.cfg 就没有
search --no-floppy --fs-uuid --set 3c7c1d30-86c7-4ea3-ac16-30d6b0371b02
的语句
可是我的 ntfs 分区的 windows 好像没有问题,是不是像 pt 说的那样,因为都督的分区是 fat32?
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: Live Ubuntu Backup V2.1,备份你的 ubuntu 为可启动的 squashfs 文件

#152

帖子 smallapple » 2009-11-04 17:41

不仅仅是 fat32 的问题 ,下面这位连 ext 格式也有问题
viewtopic.php?f=77&t=238175
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Live Ubuntu Backup V2.1,备份你的 ubuntu 为可启动的 squashfs 文件

#153

帖子 wangdu2002 » 2009-11-04 19:04

首先顶下熊哥。。。终于鲁般lub2.1正式发布了。。。 :em11
不过还是觉得,熊哥打的zip应当把reademe.lxt搞进去,这样备份前,至少会先安装lupincasper和squashfs-tools,以及在其他电脑上转换系统前,可以先瞧下恢复说明,操作会更顺手些。 :em09

另外,熊哥生成备份文件名不需要用那么多个小数点吧。2009.11.04.squashfs。其实年月日固定用八位xxxxyyzz就已经很清楚了,再加点分隔没多大必要
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Live Ubuntu Backup V2.1,备份你的 ubuntu 为可启动的 squashfs 文件

#154

帖子 wangdu2002 » 2009-11-04 19:06

也顶顶小苹果的脚本修改。。。可以免去以后更新内核后又需要修改grub.cfg了。
这应该是个重大bug,苹果向launch.pad汇报吧。。。 :em06
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.1,备份你的 ubuntu 为可启动的 squashfs 文件

#155

帖子 billbear » 2009-11-04 19:28

wangdu2002 写了:首先顶下熊哥。。。终于鲁般lub2.1正式发布了。。。 :em11
不过还是觉得,熊哥打的zip应当把reademe.lxt搞进去,这样备份前,至少会先安装lupincasper和squashfs-tools,以及在其他电脑上转换系统前,可以先瞧下恢复说明,操作会更顺手些。 :em09

另外,熊哥生成备份文件名不需要用那么多个小数点吧。2009.11.04.squashfs。其实年月日固定用八位xxxxyyzz就已经很清楚了,再加点分隔没多大必要
lub -h 就是你要的 readme 了 :)
备份文件名在生成后你可以随意修改。引导的时候会查找所有分区里名叫 casper 的文件夹下的 *.squashfs,把找到的第一个启动起来。(所以不要有多个 casper :)
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#156

帖子 billbear » 2009-11-04 23:03

2.2 版,修正与 reiserfs 有关的 grub2 毛病。
这个版本比较满意了,明天用这个做一个衍生版玩玩 :em01
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#157

帖子 wangdu2002 » 2009-11-04 23:14

备份文件名在生成后你可以随意修改。引导的时候会查找所有分区里名叫 casper 的文件夹下的 *.squashfs,把找到的第一个启动起来。(所以不要有多个 casper
某也知道可以改名。。。虽然看着好几个点不爽。。。不过懒得动手了而已。 :em05
某刚用2.1又备份了一次系统。。。熊哥就出2.2了。。。 :em06
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#158

帖子 billbear » 2009-11-04 23:45

2.2 和 2.1 没啥区别,如果不往 reiserfs 恢复的话。 :em04
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#160

帖子 ptptptptptpt » 2009-11-04 23:58

哦,是不是把 grub2 里面 重复了一下 target_cmd "$tgt" grub-install $grubdev ?

ucloner 3.5.0 里面直接copy 的你原来的代码,我还以为 grub2 不用重复了呢
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#161

帖子 billbear » 2009-11-05 0:09

是啊,刚发现安装到 reiserfs 还是有问题,我的情况写在 https://bugs.launchpad.net/ubuntu/+sour ... bug/464743 的 3 楼,其实应该另开一个报告的,我和他的情况并不相同,只不过都出 error: sparse file not allowed

现在的情况好像是这样,在 chroot 进去运行 grub-install 的时候,如果目标系统(reiser)已经存在 /boot/grub/ 里面的那些东西,那么就会安装成功。这也就是第二次 grub-install 时的处境。(我做备份时就直接把 /boot/grub 全部排除掉了,第一次运行 grub-install 的时候把 /boot/grub 生产出来)其它文件系统都只要一次 grub-install。
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#162

帖子 billbear » 2009-11-05 9:49

好像 9.10 fstab 默认的挂载选项又变回 defaults 去了。我觉着 relatime 挺好的。
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#163

帖子 ptptptptptpt » 2009-11-05 10:17

不知道有何区别??

没准 default 包括 relatime
freedomsky
帖子: 10
注册时间: 2008-07-12 23:38

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#164

帖子 freedomsky » 2009-11-05 13:00

老大,我想问下
我的系统是8.04服务器版,硬盘是做的RAID。分区如下:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 21381 171742851 83 Linux
/dev/sda2 21382 22290 7301542+ 5 Extended
/dev/sda5 21382 22290 7301511 82 Linux swap / Solaris

我在按照你的文档进行恢复的时候,出现
将哪个分区作为 / ?
1) /dev/sda1 ext3 176GB
2) /dev/sda5 swap 7477MB
#? 1
你选择的是 /dev/sda1, 里面现有这些文件/目录:
bin casper dev home initrd.img lost+found mnt proc sbin sys usr vmlinuz
boot cdrom etc initrd lib media opt root srv tmp var
确定?(y/n)
y
是否格式化此分区?(y/n)
y
格式化 /dev/sda1 为:
1) ext2
2) ext3
3) ext4
4) reiserfs
5) jfs
6) xfs
#? 2
将哪个分区作为 swap ?
1) 3) 无
2) /dev/sda5 swap 7477MB 4) 无,并结束分区设定。
#? 2
你选择的是 /dev/sda5, 里面现有这些文件/目录:
确定?(y/n)
y
/dev/sda5 将被格式化为 swap.
将哪个分区作为 /home ?
1) 3) 无
2) 4) 无,并结束分区设定。
#? 4
开始格式化分区 (如果有需要格式化的分区的话)。继续? (y/n)
y
umount: /: device is busy
umount: /: device is busy
无法卸载 /dev/sda1


这是什么情况呢,希望指点一下,是不是要对硬盘从新分配?
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: Live Ubuntu Backup V2.2,备份你的 ubuntu 为可启动的 squashfs 文件

#165

帖子 billbear » 2009-11-05 13:13

ptptptptptpt 写了:不知道有何区别??

没准 default 包括 relatime
The relatime mount option stands for relative atime (or time of last access), and relatime will only update the atime if the previous atime is different than the mtime (modification time) or ctime (time of last status change).

relatime - 每次读取档案/目录内容时,只在档案/目录 inode 上原先的最后存取时间旧于最后修改时间 (modify time) 或更新时间 (change time) 才更新最后存取时间。可以减少对档案系统的负荷,但不影响如 mutt 之类需要存取时间的应用程序。

从前是 defaults,从 8.04 开始改成 relatime:

http://brainstorm.ubuntu.com/idea/2369/

The Ubuntu installers will now mount partitions using the relatime option. What’s relatime? It fixes what has been called “the most stupid Unix design idea of all times.” The problem is how Linux keeps track of the last time files were accessed. The relatime option is a more efficient way of doing this, and using it should result in noticeably improved disk performance.
回复