(2007.04.20更新)移动硬盘启动 ubuntu live cd

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#31

帖子 gnix_oag » 2007-04-09 17:56

建议用我的方法
呵呵,抢生意了。
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#32

帖子 ptptptptptpt » 2007-04-09 18:16

hsy541 写了:和我以前发的另类装机方法的帖子内容一样
所以楼主要尊重我的劳动成果标明出处!

不要急着运行sudo ./bootlace.com /dev/sda
小心把自己机子mbr覆写了,用fdisk确定一下再

装feisy fawn也没有问题
另外装Vista也可以用类似方法
在menu.lst里面添上
title Vista
chainloader (hd0,0)/bootmgr
boot
估计可以实现一个移动硬盘安装多个操作系统

强烈建议以后操作系统都用移动硬盘安装
方便:把iso解压到移动硬盘,在menu.lst里面添上启动项就可以了!
快捷:比光盘安装快不是一点点!
安全:比从内置硬盘安装安全多了,至少不要转换分区格式

更强烈建议电脑城的师傅装windows也用这种方法,顾客等的时间少,也不用把自己光驱的第一次献给你们的烂盘!

老兄 , 你不妨看看发贴时间
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#33

帖子 ptptptptptpt » 2007-04-09 18:19

我的确是受 gnix_oag 兄的启发,这贴的内容去年就发在这里了 viewtopic.php?t=29692&highlight=

前不久才另发在了这贴里


除了 gnix_oag 兄的帖子,我没见过讲类似内容的
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#34

帖子 ptptptptptpt » 2007-04-09 18:44

skyx 写了:
ptptptptptpt 写了:难怪了, casper目录 必须放在移动硬盘上

要想从 HD*启动的话, INITRD 须做些改动
原来是这样啊,是哪个文件?我应该只要知道文件是哪个就行了,我有个6.06的现成的,以前用md5sum和6.06光盘的INITRD对比过,的确是不同。
就是 /scripts/casper 里面, find_cd 那一段吧,要不回头发上来一个
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#35

帖子 skyx » 2007-04-12 0:42

都把这事给忘了,这个casper是pt你改的吗?

代码: 全选

find_cd() {
   mounted=
        for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do
            devname=$(sys2dev "${sysblock}")
               for dev in $(subdevices "${sysblock}"); do
                    devname=$(sys2dev "${dev}")
                    case $(get_fstype "${devname}") in
                        vfat|iso9660|ntfs|etx3|udf|reiserfs)
                            mount -t $(get_fstype "${devname}") -o ro "${devname}" $mountpoint || continue
                            if casper_path $mountpoint; then
                                echo $(casper_path $mountpoint)
                                return
                            else
                                umount $mountpoint
                            fi
                            ;;
                    esac
                done
        done
       }   
no security measure is worth anything if an attacker has physical access to the machine
头像
drivel
帖子: 1918
注册时间: 2006-07-08 9:21
来自: University of Science and Technology Beijing
联系:

#36

帖子 drivel » 2007-04-12 8:18

为什么不直接做个系统呢?
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#37

帖子 skyx » 2007-04-12 10:09

drivel 写了:为什么不直接做个系统呢?

pt的方法,在本地硬盘上实现不了
关于入门的东东,都要了解下
no security measure is worth anything if an attacker has physical access to the machine
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#38

帖子 skyx » 2007-04-12 10:26

find_cd original

代码: 全选

find_cd() {
	mounted=
        for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do
            devname=$(sys2dev "${sysblock}")
            fstype=$(get_fstype "${devname}")
            if /lib/udev/cdrom_id ${devname} > /dev/null; then
                mount -t ${fstype} -o ro "$devname" $mountpoint || continue
                if casper_path $mountpoint; then
                    echo $(casper_path $mountpoint)
                    return
                else
                    umount $mountpoint
                fi
            elif is_usb_device "$sysblock"; then
                for dev in $(subdevices "${sysblock}"); do
                    devname=$(sys2dev "${dev}")
                    fstype=$(get_fstype "${devname}")
                    case ${fstype} in
                        vfat|iso9660|udf)
                            mount -t ${fstype} -o ro "${devname}" $mountpoint || continue
                            if casper_path $mountpoint; then
                                echo $(casper_path $mountpoint)
                                return
                            else
                                umount $mountpoint
                            fi
                            ;;
                    esac
                done
	    elif [ "${fstype}" = "squashfs" ]; then

                # This is an ugly hack situation, the block device has
                # a squashfs image directly on it.  It's hopefully
                # casper, so take it and run with it.

                ln -s "${devname}" "${devname}.${fstype}"
                echo "${devname}.${fstype}"
                return
            fi
        done
}

find_cd edited

代码: 全选

find_cd() {
   mounted=
        for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do
            devname=$(sys2dev "${sysblock}")
               for dev in $(subdevices "${sysblock}"); do
                    devname=$(sys2dev "${dev}")
                    case $(get_fstype "${devname}") in
                        vfat|iso9660|ntfs|etx3|udf|reiserfs)
                            mount -t $(get_fstype "${devname}") -o ro "${devname}" $mountpoint || continue
                            if casper_path $mountpoint; then
                                echo $(casper_path $mountpoint)
                                return
                            else
                                umount $mountpoint
                            fi
                            ;;
                    esac
                done
        done
       }   
set_usplash_timeout() {
    if [ -x /sbin/usplash_write ]; then
        /sbin/usplash_write "TIMEOUT 120"
    fi
}
no security measure is worth anything if an attacker has physical access to the machine
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#39

帖子 ptptptptptpt » 2007-04-12 11:03

呵呵记不大清了,或者可能是GAO — XING 兄的杰作

原程序很复杂,估计是为了照顾到 各种各样 五花八门的 CDROM ,而根本就没有考虑从 硬盘 或 移动硬盘 启动,能从移动硬盘启动,可能仅仅是一个巧合 —— 支持 UBS CDROM 的代码鬼使神差地加了个 VFAT 文件系统的支持,于是乎,……

而 若 仅考虑 CSAPER 在硬盘或移动硬盘的情况, 只要搜索 /dev/[hs]d?[1-9]* 就好了
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#40

帖子 skyx » 2007-04-12 11:17

gnx 对启动过程了如指牚
是湖南继曾毛刘彭朱宋马等等伟人之后的第n位伟人。
no security measure is worth anything if an attacker has physical access to the machine
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#41

帖子 ptptptptptpt » 2007-04-12 11:23

靠,这不刺激我嘛
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#42

帖子 ptptptptptpt » 2007-04-12 11:26

女生面前,不可说另一个女生漂亮,即使那个女生真的貌若天仙;

男生面前,嘿嘿,……

人道,呼唤人道~~~

不过有个女生例外 —— 林志玲
上次由 ptptptptptpt 在 2007-04-12 11:28,总共编辑 1 次。
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#43

帖子 skyx » 2007-04-12 11:27

ptptptptptpt 写了:呵呵记不大清了,或者可能是GAO — XING 兄的杰作
可能仅仅是一个巧合 —— 支持 UBS CDROM 的代码鬼使神差地加了个 VFAT 文件系统的支持,于是乎,……

而 若 仅考虑 CSAPER 在硬盘或移动硬盘的情况, 只要搜索 /dev/[hs]d?[1-9]* 就好了

case ${fstype} in
vfat|iso9660|udf)



pt:

你说的是这句吗?
no security measure is worth anything if an attacker has physical access to the machine
头像
skyx
论坛版主
帖子: 9202
注册时间: 2006-12-23 13:46
来自: Azores Islands
联系:

#44

帖子 skyx » 2007-04-12 11:28

ptptptptptpt 写了:靠,这不刺激我嘛
我就是这个意思!不刺激一下你们这些懂shell的,你们就不思进取。
no security measure is worth anything if an attacker has physical access to the machine
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16

#45

帖子 ptptptptptpt » 2007-04-12 11:33

skyx 写了:
case ${fstype} in
vfat|iso9660|udf)


pt:

你说的是这句吗?
是的 ,我是这样猜测

俺是很想进取啊,HOHO, 现实,残酷的现实……

又得走了,因为卡里没钱了 :em18
回复