打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
将Ubuntu Linux系统装进移动硬盘的方法
2007-10-24 11:36 kit 赛迪网 字号: |
在资金不充裕的情况下,没办法随时使用笔记本,有没有别的方法在公共计算机上安全自由的使用自己的程序和文件呢?把Ubuntu安装到自己移动硬盘上,就是一个不错的办法。
AD:2013大数据全球技术峰会低价抢票中
◆1、在Windows下从硬盘将 Ubuntu 装进移动硬盘(Grub for dos用0.4.3版本方有效)
在安装之前,要把硬盘引导文件和ubuntu-7.10-alternate-i386.iso放到某个盘符下(放移动硬盘下不行,grub之初检不到),7.10可以在ntfs下,不过以前的版本得在fat32下。后面和硬盘安装一样,只是装到移动硬盘上。在提示装Grub时最好不要装在win的mbr,可填上/dev/sdb(因为内部有SATA硬盘了)
◆2、将 GRUB4DOS 引导代码写入移动硬盘MBR
在已装好的ubuntu下,进入 bootlace.com 所在目录,假设移动硬盘为 /dev/sdb
运行命令
sudo ./bootlace.com --floppy /dev/sdb
◆3、配置 GRUB4DOS
在移动硬盘上找一个或新建一个 fat16/fat32/ext2/ext3 分区,将grldr 拷至其根目录, 并在同一目录下建立 menu.lst 文件,内容如下:
timeout 6 default 0 title Ubuntu, kernel 2.6.20-16-lowlatencykernel /boot/vmlinuz-2.6.20-16-lowlatency root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro quiet splashinitrd /boot/initrd.img-2.6.20-16-lowlatencyquiettitle Ubuntu, kernel 2.6.20-16-lowlatency (recovery mode)kernel /boot/vmlinuz-2.6.20-16-lowlatency root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro singleinitrd /boot/initrd.img-2.6.20-16-lowlatencytitle Ubuntu, kernel 2.6.20-16-generickernel /boot/vmlinuz-2.6.20-16-generic root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro quiet splashinitrd /boot/initrd.img-2.6.20-16-genericquiettitle Ubuntu, kernel 2.6.20-16-generic (recovery mode)kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro singleinitrd /boot/initrd.img-2.6.20-16-generictitle Ubuntu, kernel 2.6.20-15-lowlatencykernel /boot/vmlinuz-2.6.20-15-lowlatency root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro quiet splashinitrd /boot/initrd.img-2.6.20-15-lowlatencyquiettitle Ubuntu, kernel 2.6.20-15-lowlatency (recovery mode)kernel /boot/vmlinuz-2.6.20-15-lowlatency root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro singleinitrd /boot/initrd.img-2.6.20-15-lowlatencytitle Ubuntu, kernel 2.6.20-15-generickernel /boot/vmlinuz-2.6.20-15-generic root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro quiet splashinitrd /boot/initrd.img-2.6.20-15-genericquiettitle Ubuntu, kernel 2.6.20-15-generic (recovery mode)kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro singleinitrd /boot/initrd.img-2.6.20-15-generictitle Ubuntu, memtest86+kernel /boot/memtest86+.binquiet### END DEBIAN AUTOMAGIC KERNELS LIST
其中,“177430b6-2e85-4674-88c1-029d51aeca13”需换成根分区"/" 的UUID。
查看各分区UUID的命令:
ls -l /dev/disk/by-uuid
或者直接到通过装好的ubuntu 看移动硬盘中根分区下/boot/grub/menu.list中去看它写入的uuid是多少,复制过来就行
◆4、硬件自动检测
将ptptptptpt附件中 S03xconfig.sh 复制到 /etc/rc2.d/ ,并修改其权限使“允许作为可执行文件执行” —— 这个用来配置 X 。至此,移动硬盘系统已经可以在不同机子上运行了。
sudo cp xxxxx/S03xconfig.sh /etc/rc2.d/S03xconfig.sh;xxxxx省略,按实际路径做
sudo chmod 755 /etc/rc2.d/S03xconfig.sh
再安装两个软件以增强硬件检测能力:启动移动硬盘系统,设置好源,连上网络,运行命令代码:
apt-get update
apt-get install discover1 xresprobe
搞定。
◆5、如果不支持USB-HDD启动,可以将移动硬盘中装好的/boot目录,上述menu.list文件放到机器C:\下,并在装好Grub4dos,改好boot.ini启动选改好的项即可。
◆6、在将移动硬盘插到别的机器上时要设重新设一下xserver
sudo dpkg-reconfigure xserver-xorg
在从HDD启动时,应该要在kernel和initrd后添加盘
如我的是:
kernel (hd0,7)/boot/vmlinuz-2.6.20-16-lowlatency root=UUID=177430b6-2e85-4674-88c1-029d51aeca13 ro quiet splash
initrd (hd0,7)/boot/initrd.img-2.6.20-16-lowlatency。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
WIN7下硬盘安装linux双系统教程(EasyBCD法)[图文]
转:grub2基础教程
XP硬盘安装Ubuntu 10.10双系统图解
Ubuntu修改grub引导菜单
ubuntu开机直接进入命令行模式
用 grldr 引导WinXP/Ubuntu双系统基础教程(图文)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服