Find the answer to your Linux question:
Results 1 to 10 of 10
Hello all, I posted a similar question over at the Ubuntu forum, but I thought I'd give it a go here as well. Apologies if you've read the other one. ...
  1. #1
    Just Joined! evyxmsj's Avatar
    Join Date
    Jun 2009
    Location
    Nottingham. UK
    Posts
    5

    [SOLVED] Help needed for installation

    Hello all,

    I posted a similar question over at the Ubuntu forum, but I thought I'd give it a go here as well. Apologies if you've read the other one.

    My aim is to install Linux Ubuntu fully on an external USB hard drive - ie not dual install.

    I have tried numerous times with different partition combinations, and always get an error. I have progressed from vfat formatting failure (I subsequently gave up on making a FAT32 partition), to GRUB error 18, to error 22, to error 2.

    I have been trying to do this by physically disconnecting my internal HDD and booting with the Live CD and the USB HDD connected. The Ubuntu installer recognises the USB drive fine, and installs. As far as I can tell, it is just GRUB that doesn't work.

    My latest attempt was simply to use the installer's default user-friendly "use entire disk" option along with boot settings as default hd0. This attempt resulted in GRUB Error 2.

    I have to admit that I am at my wit's end on how to install Ubuntu. Any help would be appreciated (as I really want to give Linux a go). Please note that I am a complete novice at this!

    Computer: Advent 4211 (it can boot from USB). This computer doesn't have a CD drive, so I have been using another for installation (but testing on both).

    USB Hard drive: Freecom branded SAMSUNG HM250JI (250 GB, 5200 rpm).

    Ubuntu Live CD: Created from Ubuntu 9.04 desktop ISO file (downloaded), 32 bit version.

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Welcome to the forums evyxmsj

    I assume you get the grub error after the install process, when you try to restart the system ... do you get a grub prompt something like this
    Code:
    grub>
    If you do try typing
    Code:
    find /boot/grub/menu.lst
    and post what this command returns.

  3. #3
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by evyxmsj View Post
    Hello all,

    I posted a similar question over at the Ubuntu forum, but I thought I'd give it a go here as well. Apologies if you've read the other one.
    Thats ok. Many of us are like that Welcome to the forum.
    Quote Originally Posted by evyxmsj View Post
    My aim is to install Linux Ubuntu fully on an external USB hard drive - ie not dual install.

    I have tried numerous times with different partition combinations, and always get an error. I have progressed from vfat formatting failure (I subsequently gave up on making a FAT32 partition), to GRUB error 18, to error 22, to error 2.
    I don't know the meaning of those error messages so cannot confirm if thats a 'progress' Anyway, don't format the drive with FAT32 esp when you have decided to install _only_ ubuntu (or any linux) on your disk.
    Quote Originally Posted by evyxmsj View Post
    I have been trying to do this by physically disconnecting my internal HDD and booting with the Live CD and the USB HDD connected. The Ubuntu installer recognises the USB drive fine, and installs. As far as I can tell, it is just GRUB that doesn't work.

    My latest attempt was simply to use the installer's default user-friendly "use entire disk" option along with boot settings as default hd0. This attempt resulted in GRUB Error 2.
    Once you finish installing ubuntu, whether by disconnecting internal drive or not, are you trying to boot with internal drive connected? In that case, your internal drive will not have information for ubuntu.

    What do you have in your internal drive? If you have linux in internal drive see to it that in the grub.conf (or menu.lst) file you have entry lilke,
    Code:
    title Ubuntu
    root (hd1,0)
    kernel /boot/vmlinuz-2.6...... root=/dev/sdbX
    initrd   /boot/initrd.img-2.6...
    Considering that you have only one internal drive, the external drive will be hd1. Ubuntu by default installs grub on MBR so its (hd1,0). Edit vmlinuz and initrd entries as per names in /boot. For initial Ubuntu 9.04 install I guess its vmlinuz-2.6.28-11-generic and initrd.img-2.6.28-11-generic. Then, sdb means second drive and X should be replaced by number of the partition. If you have choosen the defaults then it will be /dev/sdb1.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  4. #4
    Just Joined! evyxmsj's Avatar
    Join Date
    Jun 2009
    Location
    Nottingham. UK
    Posts
    5
    Quote Originally Posted by Jonathan183 View Post
    Welcome to the forums evyxmsj

    I assume you get the grub error after the install process, when you try to restart the system ... do you get a grub prompt something like this
    Code:
    grub>
    If you do try typing
    Code:
    find /boot/grub/menu.lst
    and post what this command returns.
    Thanks for your posts.

    Jonathan183:

    The error does indeed come when I try to restart the system. Unfortunately, though, a grub command line doesn't appear - the computer just hangs on error 2. Any ideas?

    saivin:

    How about numerical progress!

    I tried booting up after full install with both the internal drive (windows) connected and disconnected - same problem occurs.

    I must admit that I am not too clear on your instructions (being a newbie); the internal drive was disconnected, so the external drive would have come up as hd0, right?

    That's what appeared to be so in the Ubuntu setup. The "device for boot loader installation" was hd0 be default.

    Could that be the problem?

    (I am not too sure what vmlinuz or initrd are. Can I even edit these if I don't have any other machine with Linux?)

  5. #5
    Linux Newbie egan's Avatar
    Join Date
    Feb 2009
    Location
    Mountain View, CA
    Posts
    132
    I actually run my Ubuntu off an external hard drive... took me a long time to figure it out.

    Basically, on the last step of installation, you have to click Advanced and choose the correct partition for GRUB to install to. For example, here is my partition scheme as displayed by the installer:
    hd0
    sda
    sda1
    sda2
    sda3
    sda4
    sdb
    sdb1
    sdb2
    sdb3

    Since my root partition is on sdb1, I choose that one. I am unsure of what choosing sdb would do, but my way works so I haven't looked into it.

  6. #6
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Quote Originally Posted by evyxmsj View Post
    The error does indeed come when I try to restart the system. Unfortunately, though, a grub command line doesn't appear - the computer just hangs on error 2. Any ideas?
    Try boot using live CD and check output of find command. I suggest you get the USB drive to boot on the machine you use for doing the install first.

  7. #7
    Just Joined! evyxmsj's Avatar
    Join Date
    Jun 2009
    Location
    Nottingham. UK
    Posts
    5
    Jonathan183

    I couldn't get the terminal to find the driectory at first. I eventually found everything by using the file browser. The menu.lst is under: /media/boot/grub/menu.lst.

    The output is long, sorry for posting all of it (I don't know what's important).

    # menu.lst - See: grub(, info grub, update-grub(
    # grub-install(, grub-floppy(,
    # 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'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3

    ## 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 specific 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_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=5f697300-bc8c-4d74-a715-d2a269f7f2af ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=5f697300-bc8c-4d74-a715-d2a269f7f2af

    ## 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

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=

    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single

    ## 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

    ## specify if running in Xen domU or have grub detect automatically
    ## update-grub will ignore non-xen kernels when running in domU and vice versa
    ## e.g. indomU=detect
    ## indomU=true
    ## indomU=false
    # indomU=detect

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false

    ## ## End Default Options ##

    title Ubuntu 9.04, kernel 2.6.28-11-generic
    uuid 5f697300-bc8c-4d74-a715-d2a269f7f2af
    kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=5f697300-bc8c-4d74-a715-d2a269f7f2af ro quiet splash
    initrd /boot/initrd.img-2.6.28-11-generic
    quiet

    title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
    uuid 5f697300-bc8c-4d74-a715-d2a269f7f2af
    kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=5f697300-bc8c-4d74-a715-d2a269f7f2af ro single
    initrd /boot/initrd.img-2.6.28-11-generic

    title Ubuntu 9.04, memtest86+
    uuid 5f697300-bc8c-4d74-a715-d2a269f7f2af
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

  8. #8
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Boot from the live CD, open a terminal and type
    Code:
    sudo grub
    root (hd0,1)
    setup (hd0)
    quit
    This will install grub to the MBR of the first hard drive of the system, since you have the internal drive disconnected then this will install grub to the external drive.
    After that restart the system and make sure you have boot from usb enabled in BIOS, check if Ubuntu will boot from the usb drive.

  9. #9
    Just Joined! evyxmsj's Avatar
    Join Date
    Jun 2009
    Location
    Nottingham. UK
    Posts
    5
    Thanks for the advice. Unfortunately, I have temporarily lost access to the computer I was using for installing Ubuntu. I'll give it a go as soon as I can.

  10. #10
    Just Joined! evyxmsj's Avatar
    Join Date
    Jun 2009
    Location
    Nottingham. UK
    Posts
    5

    Talking Solved

    Quote Originally Posted by Jonathan183 View Post
    Boot from the live CD, open a terminal and type
    Code:
    sudo grub
    root (hd0,1)
    setup (hd0)
    quit
    This will install grub to the MBR of the first hard drive of the system, since you have the internal drive disconnected then this will install grub to the external drive.
    After that restart the system and make sure you have boot from usb enabled in BIOS, check if Ubuntu will boot from the usb drive.
    Fixed!

    I wasn't able to get a machine with a HDD that I could disconnect (I shy away from laptop insides), but I tried it anyway. A search for /grub/stage1 showed the file to be on (hd1,0) - as it was the 'second' hard drive. I tried to install grub to (hd1,0) as per your instructions, but it still failed on boot-up.

    I the end, I threw caution to the wind and re-installed everything from scratch - with the internal hard disk still connected. The USB drive was therefore read as sdb (internal = sda). The boot loader was installed to /dev/sdb1.

    For some reason, that worked. Maybe grub just didn't install properly the first time(s), or there was something wrong with some of the files. Or perhaps grub is installed/set-up differently if it is going to be the secondary device? But then again, my original installation and testing was with the USB drive connected only.

    Ah well...I get to play with Ubuntu now, so I'm happy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...