如是觀齋


此心本真如,妄想始蔽覆,顛倒無明,長淪生死,猶盲人夜行,永不見日。業相既起,境界為緣,業起緣生,重重束縛,何有自在?
須知體即法身,相即般若,用即解脫,若止觀則成定慧,定慧以明心,德相圓矣!

2007年11月7日 星期三

Installing Ubuntu on External USB HDD

轉載自http://www.belutz.net/2007/04/13/installing-ubuntu-on-external-usb-hdd/
UPDATE: 25 May 2007

I just do a fresh install of Edubuntu 7.04 on my external HDD. I did skip Step 8 - Step 11 and it works perfectly.

I just buy an external 2.5〃 HDD. I was planning it to be a medium for backing up my data. But finnaly I decided to install Edubuntu 6.10 in it, so I can boot from the external HDD. Actually the installation process needs a little editing if you want to install Grub in the external HDD and boot from it.

What you need to prepare:

A computer (of course), in this case I use my notebook
An Alternate CD of (U)(Ku)(X)(Edu)buntu
2 cups of coffee

Here’s the step by step procedures:
Step 1
First, you need to set boot order in the BIOS of your computer 1st boot is CDROM, 2nd boot is the USB HDD.
If you are using a PC instead of notebook, it’s better to unplug your internal HDD first so you won’t be confuse which one is the internal HDD and which one is the external HDD.

Step 2
Boot the CD, and choose “Install to HDD”. Answer all the question just like the normal installation.

Step 3
When it comes to Partition Phase, make sure you create a partition in the right HDD.
In my case, my internal HDD is /dev/sda* and my external HDD is /dev/sdb*
If you’re not sure about this, choose “Go Back” option on the lower left of the screen. And then choose “Execute A Shell”. After a shell window appear, type “fdisk -l” (without the quote). It will list all the storage device in your computer. Find the right device of your external HDD and make note of it. And then type “exit” to return to the partition phase.

Now that you’re sure which storage device of the external HDD, you can manually edit the partition or just erase entire disk (I won’t explain about partitioning here).

Step 4
After the installation reach for the GRUB question, answer NO to this question and in the next screen choose the right storage device of the external HDD, in my case is /dev/sdb.

Step 5
After finish installing, it will ask you to reboot the computer and it will eject the CD. Make sure you insert the CD again before the computer rebooting.
When the CD is loaded, choose “Rescue a broken System”

Step 6
When the system comes back up it will ask for a partition to mount. Pick the correct mount point for your external HDD from the list, in my case I choose /dev/sdb1

Step 7
When it comes up to a terminal window (with “Rescue Mode” in the upper/lower left screen), hold down Ctrl-Alt-F2 to open another terminal window.

Step 8
Type these lines in the terminal

mount -tproc proc /target/proc (press enter)

chroot /target (press enter)

su (press enter)

Step 9
I use nano for editing files, if you are more comfortable using vim, by all means it’s ok.
We need to edit the modules file to make sure USB support is added/loaded during Ubuntu startup.

nano /etc/initramfs-tools/modules (press enter)

Add this lines after the last line in the file

ehci-hcd
usb-storage
scsi_mod
sd_mod


Don’t forget to save the file by pressing Ctrl-X

Step 10
Edit the initramfs.conf file to make sure there’s enough time for USB support to load before Ubuntu gets running.

nano /etc/initramfs-tools/initramfs.conf (press enter)

At the top of the file, add this line with all in uppercase letter

WAIT=12

Save the file by pressing Ctrl-X

Step 11
Recreate the initrd.img file to include USB support

mkinitramfs -o /boot/initrd.img-2.6.17-10-386 /lib/modules/2.6.17-10-386 (press enter)

Step 12
Edit the GRUB bootloader menu file

nano /boot/grub/menu.lst (press enter)

Find the Ubuntu menu further down. You have to change it into hd(0,0) instead of hd(0,1) because we want the external HDD to be the first HDD if we boot from external HDD.
There are 3 menu entries for Ubuntu in that file, and change all of them from hd(0,1) into hd(0,0)
Save the file by pressing Ctrl-X

Step 13
Exit the terminal window by typing exit (press enter) until the screen actually says to press enter.
Hold down Ctrl-Alt-F1 to go back to the Rescue Mode terminal and type exit (press enter) to reboot the computer. And make sure the get the CD out from the CDROM drive.

Step 14
After rebooting, Ubuntu will continues to run it’s install process and comes to the desktop. Use the username and password you enter earlier in the install process to start using Ubuntu.

0 個意見:

張貼留言

訂閱 張貼留言 [Atom]

<< 首頁