当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 5 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [wiki]Breezy loaded on external USB drive !
帖子发表于 : 2005-12-28 19:18 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
Hi Folks,

Since my first post on this topic a few days ago, I have learned quite a bunch about the UBUNTU install process ... and managed to successfully load UBUNTU a number of times on my external USB drive. (Call me crazy, but I wanted to run the install a few times to make sure that what I was doing would work every time.)

I would like to share my updated outline with others who may also be struggling with this process.

BACKGROUND: I have an internal hard drive (western digital) already in my system with Windows XP Pro installed (which shows up as drive HDA in the UBUNTU partitioning phase of the install). My external USB drive is a Seagate 40GB Portable External Hard Drive that was purchased at Walmart for around $120

REQUIREMENTS: Make sure you have your bios set to boot the CDROM first and then the USB device, or you will have problems down in step 4. (Kudos to "joess" for pointing out my omission!)

IMPORTANT: Don't forget that Linux is case sensitive on everything, including file and directory names. (There is a difference between an uppercase and a lowercase letter.) Example: According to Linux, a file named "DaBruGo" and a file named "dabrugo" are considered two completely different files.



Here is what I now do to successfully load UBUNTU v5.10 on this EXTERNAL USB DRIVE ...



(1) Instead of using "expert" mode to install, I just hit enter to start the install process (using the install CD ... NOT the live CD).

(2) During the partitioning phase, I let the install program format my external USB drive. (I believe UBUNTU calls this a guided partitioning ... which sets up an ext2 or ext3 partition and a swap partition for you.)

NOTE: Look for the line during the partitioning phase that might say ...
erase entire disk SCSI (0,0,0) (sda)

BE VERY CAREFUL on these screens to choose the correct SDA drive and NOT an HDA drive or you may unintentionally format another drive in your system. There is no undo button for this!

Once again ... BE 100% SURE OF THE DRIVE YOU WANT TO FORMAT!

(3) When the install gets to loading the GRUB bootloader ... DO NOT LET IT LOAD TO ANY OTHER DRIVE BUT THE EXTERNAL USB drive we are working with here.

The install program will ask to load GRUB to the master boot record (MBR) of your internal hard drive (HDA). Say NO to this, and on the next screen, type in the correct path to the SDA (external USB) drive where we want to install the GRUB bootloader.
(Mine was /dev/sda)

NOTE: at this point, the install program loads some stuff and ejects the CD ... wanting you to do a reboot.

(4) BE 100% SURE to leave the CD in the drive (and close the drive door) before rebooting. When the PC reboots, type in rescue (to load UBUNTU in rescue mode) ( Review REQUIREMENTS at the beginning of this quide! )

Why do we startup in rescue mode you might ask? It's because we have to edit a few files to get USB support loaded before UBUNTU actually gets going. And, we also need to change a setting in the GRUB menu file to make it work correctly.

(5) When the system comes back up it will ask for a partition to mount. Pick the correct mount point for your drive from the list.
(Mine was mount /dev/discs/disc1/part1)

(6) When it comes up to a terminal window (with RESCUE MODE in the upper left corner) and just sits there, hold down Ctrl-Alt-F2 to open another terminal window for us to do our edits in.

(7) Type in these lines before we start editing out files ...

mount -tproc proc /target/proc <enter>
chroot /target <enter>
su <enter>

NOTE: I used vim to edit the files. It is weird to use at first until you learn what a few keys do in it ... The INSERT key allows you to actually enter text where you place the cursor ... The ESC key takes you out of INSERT mode ... And hitting : x <enter> saves the file and exits out of vim. (IMPORTANT TIP ... that's a colon and a lowercase x with NO SPACE between the colon and the x)

( 8 ) Run vim to edit the modules file to make sure USB support is added/loaded during UBUNTU startup ...

vim /etc/mkinitramfs/modules <enter>

Right below the last line of text, enter these lines ...

ehci-hcd
usb-storage
scsi_mod
sd_mod

Be sure to save the file changes (using : x)

(9) Run vim to edit the initramfs.conf file to make sure enough time elapses for USB support to load before UBUNTU gets running ...

vim /etc/mkinitramfs/initramfs.conf

At the very top of this file, add this line which tells UBUNTU to pause for 12 seconds before starting up ...

WAIT=12 (in all caps here, not sure if necessary though)

Be sure to save the file changes (using : x)

NOTE: Editing these two files loads the necessary commands to get USB support going so UBUNTU will recognize the external USB drive. But we still need to recompile (or recreate) the initrd.img that UBUNTU uses at startup ... so that these edits actually work.

(10) Recompile (recreate) the initrd.img file to include USB support from these edited files ...

mkinitramfs -o /boot/initrd.img-2.6.12-9-386 /lib/modules/2.6.12-9-386

(11) Edit the GRUB bootloader menu file to correct a small error that looks at the wrong drive to boot from ...

vim /boot/grub/menu.lst

Navigate down this file until you get to a section where there is a menu list (not commented out ... no #s) that has Ubuntu mentioned three times (and possibly an area mentioning Windows XP down below it, if you have XP installed on an internal drive of yours).

There is a line in these three Ubuntu menu choices that has root listed on it and probably has (hd1,0) to the right of it. We need to change this to (hd0,0) on all three of these menu choices. Why? Because according to GRUB, the external USB drive will be our first drive (hd0,0) and not our second drive (hd1,0) because we loaded GRUB on it's bootsector.

NOTE: You may want to change the root line for the Windows XP section to (hd1,0) just in case you want to boot XP from this menu.

Be sure to save the file changes (using : x)

(12) Exit out of this terminal window (keep typing exit <enter> until the screen actually says to press enter). Hold down Ctrl-Alt-F1 to get back to the RESCUE MODE terminal window and type exit<enter> to reboot the system.

BE 100% SURE TO GET THE CD OUT OF THE DRIVE BEFORE UBUNTU RESTARTS

(13) After rebooting, UBUNTU continues to run it's install process and comes to the desktop. Use the username and password you setup earlier in the install process to get into UBUNTU


That's the process I've successfully used to install UBUNTU v5.10 on an external USB drive. I hope this helps anyone whose been wrestling with this process. Let me know if it works out for you.

DAVE



OTHER PROBLEMS AND POTENTIAL FIXES ...

* Problems booting XP from an internal drive ...
(see message #2)

* Problems starting UBUNTU after a kernel update using Ubuntu's automatic update app ...
(see message #112)


http://ubuntuforums.org/showthread.php?t=80811


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2005-12-29 13:29 
头像

注册: 2005-10-16 23:26
帖子: 532
地址: 泉州
送出感谢: 0 次
接收感谢: 3
这个我笑纳了,一叶兄 :D
将定时汇报翻译进展


_________________
You make it fun
It will make you fun


页首
 用户资料  
 
3 楼 
 文章标题 : 处女作,欢迎指正!!
帖子发表于 : 2005-12-29 19:55 
头像

注册: 2005-10-16 23:26
帖子: 532
地址: 泉州
送出感谢: 0 次
接收感谢: 3
Hi,大家好,
自我几天前第一次发表有关这个主题(如何在外置USB硬盘中安装breezy)到现在,我已经从实践中学到了很多有关Ubuntu安装进程的知识,并且已经在我的外置USB硬盘上成功安装过了好多遍Ubuntu.(疯狂吧,我只是想通过多装几遍来弄清楚每次我干它一下他到底有什么反应。)

我非常乐意和大家分享我的最新体验,如果你也正在和这个问题打得火热的话。

背景(硬件平台):我有一个内置硬盘,西部数据的,上面已经装了一个Windows XP Pro系统(这个硬盘在Ubuntu的安装程序里的分区管理程序中显示为'hda')。我的外置USB硬盘是希捷的,40G大,是可移动的;这是我在沃尔马花了120美元买的。

友情提示:系统安装前你最好在你的BIOS中把CDROM设为第一启动盘,USB设备设为第二启动盘,不然在接下来的第四步你就会遇到麻烦的。(如有疏漏,欢迎指正!)

重要提示:别忘了linux是对大小写敏感的,不管是文件名还是目录名。(这里大写和小写区别可是很大的。)例如,在linux中,有一个叫“DaBruGo"和一个叫“dabrugo"的文件,他们两个可是完全不同的两个文件。


下面就是我现在如何在外置USB硬盘上成功安装Ubuntu的真经:


(1)我没有使用专家模式来安装,我只是按下Enter键来开始安装(用的是Install CD,不是Live CD哦)。
(2)在分区阶段,我让分区程序格式化我的整个外置USB硬盘。(我想这是Ubuntu的推荐分区格式吧,它会自动为你划分一个ext2或者ext3格式的分区和一个swap分区。)

注意:当处于分区阶段时寻找下面这一行:
删除整个SCSI盘(0,0,0)(sda)

一定要万分小心,在这个阶段你要选对SDA盘,而不是HDA盘,不然的话把另一个盘给整个格式化的,并且这个操作可是不可撤销的。

再唠叨一次,一定要百分百的选对你要格式化的盘。


(3)当安装程序进入GRUB多系统引导程序的安装阶段时,要把GRUB装在这个外置USB硬盘,也就是我们现在正在用的这个盘,千万可别装到别的盘符去啊!

安装程序会询问你是否要把GRUB装在你的内置硬盘(HDA)的MBR上,这时你要选否,然后在接下来画面里输入正确的路径,也就是你要把GRUB装在外置USB硬盘的地方。

友情提示:接下来安装程序会载入一些数据,然后就会弹出CD,要你重启一下系统。

(4)一定要百分把确定在系统重启前就已经取出CD(并且关闭CD舱门)。当机子重启的时候,输入rescue(以进入rescue模式)(再看一下前面我们提到的友情提示!)

也许你会问,为什么我们要要以rescue模式启动呢?这是因为在Ubuntu真正接管机子之前我们得修改一些文件,好让机子能够支持USB设备。此外,我们也需要修改一下GRUB菜单文件中的一些设置,好让GRUB正常运行。

(5)当系统启动之后他会要求你挂载一个分区。请从列表中选择一个正确的挂载点。(我的是挂载在 /mount/dev/discs/disc1/part1)

(6)当终端窗口出现(rescue模式下是出现在左上角)时,按下Ctrl-Alt-F2打开一个新的终端窗口,以后我们的编辑修改工作就要在这地儿进行了。

(7)在编辑工作开始之前,先输入一下命令:

代码:
mount -tproc proc /target/proc <enter>
chroot /target <enter>
su <enter>

注意:我是用vim来编辑这些文件的。刚开始接触vim时你会感觉他很怪异,但知道了一些用法之后就好了:按下Intert键你就可以在光标所在地输入文字了,按下ESC键你就可以离开Insert模式了,要离开并保存文件的话你可以输入':qw'。

(8)运行VIM打开模块文件,修改一下好让Ubuntu在启动时支持USB设备:

代码:
vim /etc/mkinitramfs/modules <enter>


在打开的文件的末尾,增加下面几行:

引用:
ehci-hcd
usb-storage
scsi_mod
sd_mod

注意,可一定要先保存才能退出。

(9)运行vim打开“initramfs.conf”这个文件,好让Ubuntu在运行之前有充足的时间加载对USB设备支持的模块。

代码:
vim /etc/mkinitramfs/initramfs.conf


在打开的文件开头,增加下面几行好让Ubuntu在开始运行之前停留12秒钟:
引用:
WAIT=12 (in all caps here, not sure if necessary though)


注意,要保存才能退出。(命令就是':qw')

但是,虽然我们为了让Ubuntu识别这个外置USB设备我们已经修改了这两个文件,我们仍然需要重新编译一下Ubuntu在启动时使用的这个文件initrd.img,要不光修改那两个文件也没用。

(10)重新编译initrd.img

代码:
mkinitramfs -o /boot/initrd.img-2.6.12-9-386 /lib modules/2.6.12-9-386


(11)编辑GRUB启动菜单,修正一个小错误,不然他会从一个错误的盘引导

代码:
vim /boot/grub/menu.lst


一直往下翻,直到你找到这么一段,有一个菜单列表,里面Ubuntu被提到三次(也可能最后有提到windows XP,如果你硬盘上有装的话。)

在这三个ubuntu菜单选项中都会有这么一行,里面显示有根分区的位置,行的右边可能有写着"(hd1,0)"。为什么要多此一举?因为根据GRUB的规则,我们把GRUB装到了这个外置USB硬盘的启动块,那么他就是我们的第一硬盘(hd0,0),而不是第二硬盘(hd1,0)。

提示:如果你想从这个菜单启动Windows XP,你可以修改一下windows XP项,参照上面的把他改为(hd1,0)。

最后可一定要记得保存。

(12)离开终端窗口(键入exit,然后按下Enter键)。按下Ctrl-Alt-F1组合键回到rescue模式窗口,然后键入exit重启系统。

一定要百分百确定在系统重启前你已经取出CD。

(13)重启之后,Ubuntu就会开始安装,安装完之后进入桌面环境。用你在安装过程中设定的用户名和密码进入系统。

以上就是我成功地在外置USB硬盘上安装Ubuntu的步骤。如果有谁在这方面一直有疑问的话,我希望这能对你有所助益。如果他真的管用的话,也请让我知道一下。

DAVE


附件:
文件注释: 附:翻译全文
T-P-1.0.tar.gz [3.25 KiB]
被下载 24 次


_________________
You make it fun
It will make you fun
页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2005-12-30 13:37 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10116
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 128
http://www.ubuntu.org.cn/support/docume ... /base_view


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2006-07-29 18:55 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
http://wiki.ubuntu.org.cn/在USB硬盘中安装Breezy


_________________
https://weakish.github.io


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 5 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译