Installation and Upgrade Help For questions about upgrading and installation Ubuntu or Kubuntu 5.10 Breezy Badger 5.10. Old October 23rd, 2005 DaBruGo DaBruGo is offline A Carafe of Ubuntu Join Date: Oct 2005 Location: Louisville KY (USA) Beans: 185 Ubuntu Breezy 5.10 User Default SUCCESS - Breezy loaded on external USB drive ! Newsflash ... UPGRADING from a BREEZY USB install to DAPPER is possible !!! ( Kudos to "Killeroid" for sharing his success in this post. ) Hi Folks, Since my first post on this topic, 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 initially 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!) pre-install tip: If you feel comfortable performing one of the suggestions in post #141 then it should make the installation to the external drive (especially tip 2) run smoother. (Kudos to "Sephatine" for suggesting this.) 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 do to successfully load UBUNTU v5.10 on my EXTERNAL USB DRIVE ... ( STEP 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). INSTALL NOTE: The installation process will ask you for some information when it starts up ... first it will ask for your language, then your (language) location, then your keyboard type, then it will detect your cdrom(s), then it will attempt to detect your network configuration, then it will ask you to give your PC a name (hostname), then it detects hardware and starts up the partition phase of the install. INSTALL NOTE: When you get to STEP 2 (the partition phase), there is a simple way to determine how the install program assigns device names to your hard drive(s). Before starting any partitioning activity in STEP 2, choose the GO BACK option in the lower left corner of this screen and then choose EXECUTE A SHELL farther down in the Ubuntu installer menu that appears. Choose CONTINUE at the next prompt. In the shell window that appears, type in fdisk -l (that is FDISK -L in all lowercase). This will give you a list of all the storage devices the installer program sees. Make a note of the device names (/dev/hd? or /dev/sd?) and then type in exit to return to the partition phase (STEP 2) of the install. (Kudos to "RyanGT" for suggesting this in post #257.) ( STEP 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.) INSTALL NOTE: Look for the line during the partitioning phase that might say ... erase entire disk SCSI (0,0,0) (sda). Be careful here as some people have had problems when choosing any partitioning options that include the text "and use LVM" (Kudos to "brucetan" for sharing this in post #268.) Feel like learning about LVM anyway? Check this link out. (Kudos to "SD-Plissken" for sharing this info.) 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! ( STEP 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 [NOT sda1] ... but yours may be different depending on the number and/or types of drives in your system) COMMENT: I loaded GRUB to sda (the bootsector of the external drive) and NOT to sda1 (which would be the first partition on the external drive). INSTALL NOTE: at this point, the install program loads some stuff and ejects the CD ... wanting you to do a reboot. ( STEP 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 guide! ) 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. ( STEP 5 ) When the system comes back up it will ask for a partition to mount. Pick the correct mount point for your external drive from the list. (Mine was mount /dev/discs/disc1/part1 ... but yours may be different depending on the number and/or types of drives in your system) COMMENT: /dev/discs mount points start with disc0 (with 0 meaning the first drive in a system). So, my mount point of /dev/discs/disc1/part1 was really the second disk [disc1] (the sda drive we are working with) and the first partition [part1] on that disk. ( STEP 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. ( STEP 7 ) Type in these lines before we start editing out files ... mount -tproc proc /target/proc chroot /target su INSTALL NOTE: I used vim to edit the files. (There is a great vim cheatsheet in pdf format available from "TimL".) 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 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) ( STEP 8 ) Run vim to edit the modules file to make sure USB support is added/loaded during UBUNTU startup ... vim /etc/mkinitramfs/modules 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) COMMENT: Some PCs may need a more comprehensive list added here. Please take a look at post #181 or post #406 if you are having startup issues after these edits. (Kudos to "brotorious" for his efforts on this, and to "Jonathan.Martin" for posting his successful resolution to the problem as well.) ( STEP 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) INSTALL 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. ( STEP 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 INSTALL NOTE: When you are done with the previous step #9 (and before performing this step), you can run the "ls /lib/modules" command (without the quote marks) from a terminal window to see what kernel version number you should use for this install step. They may be using a kernel version higher than 2.6.12-9-386 that was available when I originally created this help guide. (Kudos to "Saxegaard" for bringing this to my attention in post #235.) ( STEP 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. INSTALL NOTE: You will also want to change a "# groot" line in a section of your menu.lst file that may look something like this ... ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,3) <<< CHANGE THIS LINE TO READ # groot=(hd0,0) (Kudos to "archis" for his excellent documentation of this farther down in post #227.) INSTALL NOTE: You may want to change the root line for the Windows XP section in this file to (hd1,0) just in case you have XP loaded on an internal drive and want the option to boot into XP from the GRUB menu. (See post #2 for more info.) You may have to edit this section whenever you update your kernel version. If you have problems pulling up XP after a kernel update, check this section of your menu.lst file to see if you need to edit it again. Be sure to save the file changes (using : x) COMMENT: Feel more comfortable editing this file in Windows? See post #171 for a program that will let you edit files on linux partitions from within Windows. (Kudos to "mickola" for the suggestion.) ( STEP 12 ) Exit out of this terminal window (keep typing exit 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 to reboot the system. BE 100% SURE TO GET THE CD OUT OF THE DRIVE BEFORE UBUNTU RESTARTS ( STEP 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 ... * Booting Ubuntu from Windows XP without loading GRUB to the MBR ... http://www.ubuntuforums.org/showthread.php?t=56723 (Kudos to "celticmonkey" for documenting this.) * Problems booting XP from an internal drive ... ( message #2 ) + ( message #203 ) * Problems starting UBUNTU after a kernel update using Ubuntu's automatic update app ... ( message #112 ) + ( message #161 ) * Using Windows XP to format drives larger than 32GB AS FAT32 ... ( message #188 ) * Re-installing GRUB in a relatively painless manner ... ( message #205 ) (Kudos to "RyanGT" for hunting this down.) * Creating a bootable GRUB CD (sketchy details but seems to make sense) ... ( message #207 ) + http://www.gnu.org/software/grub/man...D_002dROM.html REFERENCE MATERIALS ... * GRUB Manual (section 14.3 shows what error codes mean) http://www.gnu.org/software/grub/manual/grub.html __________________ Join Date: Oct 2005 Location: Louisville KY (USA) Beans: 185 Ubuntu Breezy 5.10 User Default Re: getting XP to boot from GRUB Hi Folks, Some people have had problems getting Windows XP to boot from GRUB. By putting these lines in the menu.lst file (/boot/grub/menu.lst) that GRUB uses, I was able to get XP to boot properly from the GRUB menu on my home PC (that has just one partition on it) ... title Windows XP Professional root (hd1,0) map (hd1) (hd0) chainloader +1 INSTALL NOTE: I installed GRUB (and UBUNTU) to my external USB hard drive during installation and NOT to my internal hard drive (where XP is loaded). COMMENT: If you have A DELL or COMPAQ computer, you may want to read ( message #203 ) for a possible change to the root line listed above (Kudos to "srirampcl" for sharing this.) EXAMPLE: My PC at work is a Dell Optiplex model and the internal hard drive has two partitions on it. * The first partition (hd0,0 which should be seen as hd1,0 to GRUB since we loaded it to the external drive and NOT the internal drive) is a Dell utility partition that the factory uses for new PC setups. * The second partition (hd0,1 which should be seen as hd1,1 to GRUB since we loaded it to the external drive and NOT the internal drive) actually has Windows XP loaded on it. * So for this example, my root line above should read as "root (hd1,1)" to correctly find and boot XP from the GRUB menu. See the second INSTALL NOTE of STEP 1 in the first post of this thread to find out how your internal hard drive may be partitioned. Hope this helps, DAVE Last edited by DaBruGo : March 9th, 2006 at 10:56 AM. Join Date: Oct 2005 Location: Southern California Beans: 26 Ubuntu 6.06 User Default Re: SUCCESS - Breezy loaded on external USB drive ! Excellent procedure. Better than the one I came up with. I decided to try your method after I got tired trying to get past this weird networking problem where DNS stops working for no good reason and reinstall ubuntu. Bye. Join Date: Oct 2005 Beans: 1 Default Re: SUCCESS - Breezy loaded on external USB drive ! I followed your directions and was finally able to install Ubuntu 5.10 Server on a 512MB USB stick plugged into a VIA EPIA MII motherboard. Thank you very much. Join Date: Oct 2005 Beans: 6 Default Re: SUCCESS - Breezy loaded on external USB drive ! I've been trying to get Breezy boot from my external harddrive last night. Unfortunately it doesn't work yet, even though I followed your step by step tutorial. Grub always hangs with just saying "Grub " on the screen during the reboot. So my laptop finds the harddrive, it just can't get grub to work properly somehow Any ideas what could be wrong here? Join Date: Oct 2005 Location: Louisville KY (USA) Beans: 185 Ubuntu Breezy 5.10 User Default Re: SUCCESS - Breezy loaded on external USB drive ! Quote: Originally Posted by javier.blazquez I followed your directions and was finally able to install Ubuntu 5.10 Server on a 512MB USB stick plugged into a VIA EPIA MII motherboard. Thank you very much. hey javier, Would you mind sharing the outline you used to get Ubuntu loaded on your USB stick? Is it different from my outline? I have a 1GB flash stick and I was wondering what type of install you used and what applications you chose for the install. I have another thread going where I'm tryin to get help with installing the Live CD onto a USB flash stick as well. Any help from you would be much appreciated. DAVE Join Date: Oct 2005 Location: Louisville KY (USA) Beans: 185 Ubuntu Breezy 5.10 User Default Re: SUCCESS - Breezy loaded on external USB drive ! Quote: Originally Posted by moonlord I've been trying to get Breezy boot from my external harddrive last night. Unfortunately it doesn't work yet, even though I followed your step by step tutorial. Grub always hangs with just saying "Grub " on the screen during the reboot. So my laptop finds the harddrive, it just can't get grub to work properly somehow Any ideas what could be wrong here? moonlord, Is there any way you could post your menu.lst file that grub uses during startup. That may be the problem. I'll be more than happy to take a look at it for ya. DAVE Join Date: Oct 2005 Beans: 6 Default Re: SUCCESS - Breezy loaded on external USB drive ! I'll try to get my menu.lst. Do you know any method to access an ext3 from windows? Btw, I changed the hd(0,0) to hd(1,0) like you explained and therefore I think there shouldn't be any differences. Or do you know where the problem could also lie? What made me wonder was the device.map in the grub folder because it says (hd0) /dev/hda and (hd1) /dev/sda shouldn't it be the other way round? Also I wondered why you use WAIT=12 where others used DELAY in other tutorials? Any differences in that? Another thing: the initramfs.conf says at the end Resume=/dev/sda5 but I thought sda5 is my swap partition? any help is appreciated. Thanks Join Date: Oct 2005 Beans: 6 Default Re: SUCCESS - Breezy loaded on external USB drive ! ok, just found a great tool called EXT2 IFS which adds ext2 and 3 support to windows xp so here is my menu.lst: Code: # menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-doc/. ## default num # Set the default entry to the entry number NUM. Numbering starts from 0, and # the entry number 0 is the default if the command is not used. # # You can specify 'saved' instead of a number. In this case, the default entry # is the entry saved with the command 'savedefault'. default 0 ## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry # (normally the first entry defined). timeout 10 ## hiddenmenu # Hides the menu by default (press ESC to see the menu) #hiddenmenu # Pretty colours #color cyan/blue white/blue ## password ['--md5'] passwd # If used in the first section of a menu file, disable all interactive editing # control (menu entry editor and command-line) and entries protected by the # command 'lock' # e.g. password topsecret # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ # password topsecret # # examples # # title Windows 95/98/NT/2000 # root (hd0,0) # makeactive # chainloader +1 # # title Linux # root (hd0,1) # kernel /vmlinuz root=/dev/hda2 ro # # # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default options below ## DO NOT UNCOMMENT THEM, Just edit them to your needs ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specifiv kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro # kopt=root=/dev/sda1 ro ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd1,0) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(recovery mode) single # altoptions=(recovery mode) single ## nonaltoption boot targets option ## This option controls options to pass to only the ## primary kernel menu item. ## You can have ONLY one nonaltoptions line # nonaltoptions=quiet splash ## controls how many kernels should be put into the menu.lst ## only counts the first occurence of a kernel, not the ## alternative kernel options ## e.g. howmany=all ## howmany=7 # howmany=all ## should update-grub create memtest86 boot option ## e.g. memtest86=true ## memtest86=false # memtest86=true ## ## End Default Options ## title Ubuntu, kernel 2.6.12-9-386 root (hd0,0) kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sda1 ro quiet splash initrd /boot/initrd.img-2.6.12-9-386 savedefault boot title Ubuntu, kernel 2.6.12-9-386 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sda1 ro single initrd /boot/initrd.img-2.6.12-9-386 boot title Ubuntu, memtest86+ root (hd0,0) kernel /boot/memtest86+.bin boot ### END DEBIAN AUTOMAGIC KERNELS LIST # This is a divider, added to separate the menu items below from the Debian # ones. title Other operating systems: root # This entry automatically added by the Debian installer for a non-linux OS # on /dev/hda1 title Microsoft Windows XP Home Edition root (hd1,0) savedefault chainloader +1 Join Date: May 2005 Location: HinataSou Beans: 1,716 Dapper Drake Testing/ User Send a message via AIM to Kyral Default Re: SUCCESS - Breezy loaded on external USB drive ! I'm curious, whats the performance like? At any rate, very good job. __________________ Official Ubuntu Member Associate Member of the Free Software Foundation Terminal For Beginners http://www.ubuntuforums.org/showthread.php?t=73885