LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-18-2013, 12:54 AM   #1
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Rep: Reputation: 15
Question Linux installed on USB will not boot


I have spent the last month trying to make a fully installed and persistent (read: not-live) USB install. I have mainly tried Mint, Xubuntu, and Puppy, and I have run into the same issue with each.

I can make a live-USB just fine and my computer boots to it just fine.

I run the installer but tell it to install to another USB flash dive instead of the internal hard drive. Usually I let everything go on one big partition on the flash dive, but I have tried a separate boot partition a couple of times. Everything is going smoothly so far.

Installation completes successfully.

I shut down the computer, remove the live-USB flash drive and boot the system.

Here is where the problem starts:

Left alone, The bios seems to check the flash drive (the light on it flashes). Then it goes straight into Windows on the main HD.

If I go into the bios boot selection menu, it lists the windows boot manager, the internal hard drive, and the USB flash drive. If I select the flash drive with Linux installed the screen goes blank for a second then returns to the boot selection menu.

Let me reiterate, a Live-mode USB flash drive in this same situation works perfectly.

I have tried:

Installing grub from the live-mode USB to the normal install USB. which installed, rechecked and updated without errors.

Copying the entire grub folder from the live-mode USB to the normal install USB.

Double and triple checking the bios settings, but again USB boots fine with live-mode.

Banged head against desk a few times for good measure.


It all ends up the same, no errors, no grub rescue prompts, just no booting.

What am I missing here?
 
Old 03-18-2013, 10:47 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu
Posts: 1,251

Rep: Reputation: 252Reputation: 252Reputation: 252
It's Grub's fault, and I seem to run into this problem frequently when trying to create a full install on a flash drive. If I paid better attention, I'd know which distros are problematic.

My last attempt, with PCLinuxOS, which uses legacy grub, worked as expected. Code tags aren't working, but the following may help:

$ cat device.map
(hd0) /dev/sdg
(hd1) /dev/sda


$ cat menu.lst
timeout 65
color black/cyan yellow/cyan
#gfxmenu (hd0,0)/boot/gfxmenu
default 0


title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=LABEL=Red vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img
<snip>


However, when things don't work, I just install extlinux as the bootloader on the flash drive.
 
Old 03-18-2013, 11:43 AM   #3
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,087

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
Quote:
Left alone, The bios seems to check the flash drive (the light on it flashes). Then it goes straight into Windows on the main HD
That would be expected behavior if you have the flash drive you installed 'TO' set to first boot priority and did not install Grub to the mbr of that flash drive. Did you install Grub to the mbr of that flash drive? With Mint and Xubuntu, which option for Installation Type did you select? Usually Something Else option will give you more control and you will be able to see more of what is happening during the install.

You indicate you installed Grub from the installation media to the other flash drive. What commands or method did you use? The command below should work after you create the mount point (/mnt/sdc1) and mount that partition. You will have to check to see if sdc is what the device you are trying to install to actually is.


Quote:
sudo grub-install --root-directory=/mnt/sdc1 /dev/sdc
 
Old 03-18-2013, 11:51 AM   #4
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,197

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
what type of pc do you have ?

i have an acer revo and when i hit f12 when the bios beeps it gives me a list of drives i can boot from so i can force it to boot from usb when needed.
 
Old 03-18-2013, 03:17 PM   #5
John VV
Guru
 
Registered: Aug 2005
Posts: 13,435

Rep: Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797
I have never had any issues doing a "normal " install on a usb2 thumb drive ( mind you usb2 is DEAD SLOW for running a operating system )

burm the iso image to a dvd
plug in the usb thumb drive
pop the dvd into the tray
reboot ( mind you booting from dvd must be enabled )

install to the usb drive
Warning:
pay VERY close attention to where the bootloader is going to be installed
put grub ON THE USB !!!
And not on the computer hard drive
 
Old 03-18-2013, 04:46 PM   #6
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,197

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
^ assuming op doesnt have a dvd drive you will need to use 2 usb drives.

the first one will need to be loaded with the live-usb so then when you boot it and run the 'install to harddrive' program you can select the other usb as the drive to install to (maybe pay extra attention to make sure that grub is loaded to the mbr of the usb).
 
Old 03-18-2013, 08:03 PM   #7
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by RockDoctor View Post
It's Grub's fault, and I seem to run into this problem frequently when trying to create a full install on a flash drive. If I paid better attention, I'd know which distros are problematic.

My last attempt, with PCLinuxOS, which uses legacy grub, worked as expected. Code tags aren't working, but the following may help:

$ cat device.map
(hd0) /dev/sdg
(hd1) /dev/sda


$ cat menu.lst
timeout 65
color black/cyan yellow/cyan
#gfxmenu (hd0,0)/boot/gfxmenu
default 0


title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=LABEL=Red vmalloc=256M acpi=on
initrd (hd0,0)/boot/initrd.img
<snip>


However, when things don't work, I just install extlinux as the bootloader on the flash drive.
I think part of the problem is that all are guides I find dealing with these non-standard installs are written for grub legacy, but every distro I come across only has grub 2. I might try that extlinux thing though.

Quote:
Originally Posted by yancek View Post
That would be expected behavior if you have the flash drive you installed 'TO' set to first boot priority and did not install Grub to the mbr of that flash drive. Did you install Grub to the mbr of that flash drive? With Mint and Xubuntu, which option for Installation Type did you select? Usually Something Else option will give you more control and you will be able to see more of what is happening during the install.
I always use the 'Something else' option and (assuming the drive is /dev/sdc according to gparted) specify /dev/sdc as the "Device for boot loader installation" and set /dev/sdc1 for /

Quote:
Originally Posted by yancek View Post
You indicate you installed Grub from the installation media to the other flash drive. What commands or method did you use? The command below should work after you create the mount point (/mnt/sdc1) and mount that partition. You will have to check to see if sdc is what the device you are trying to install to actually is.
I seem to remember trying that same command before, with the host showing that grub installed without errors, but with the same end result. But Ill try it again and see what happens.

Quote:
Originally Posted by schneidz View Post
what type of pc do you have ?

i have an acer revo and when i hit f12 when the bios beeps it gives me a list of drives i can boot from so i can force it to boot from usb when needed.
Fujitsu T902, I can also hit F12 for a list of boot options and the flash drives shows up. But when selected, the screen go blank for a second like its trying but then returns to the menu.

Quote:
Originally Posted by John VV View Post
I have never had any issues doing a "normal " install on a usb2 thumb drive ( mind you usb2 is DEAD SLOW for running a operating system )

burm the iso image to a dvd
plug in the usb thumb drive
pop the dvd into the tray
reboot ( mind you booting from dvd must be enabled )

install to the usb drive
Warning:
pay VERY close attention to where the bootloader is going to be installed
put grub ON THE USB !!!
And not on the computer hard drive
Quote:
Originally Posted by schneidz View Post
^ assuming op doesnt have a dvd drive you will need to use 2 usb drives.

the first one will need to be loaded with the live-usb so then when you boot it and run the 'install to harddrive' program you can select the other USB as the drive to install to (maybe pay extra attention to make sure that grub is loaded to the mbr of the usb).
I don't have a CD drive (but I can hook one up) but other then the DVD that is the same process I have been doing.

Also, I know USB 2.0 wont be to snappy, but this is a trial run for a USB 3.0 drive that's coming in the mail. But if I could do that ramdrive thing that the Live-mode does (loads the whole OS into RAM on boot) that would be really cool, but first things first.

Last edited by Teckno; 03-18-2013 at 09:57 PM. Reason: I type gud...
 
Old 03-18-2013, 11:15 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,435

Rep: Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797Reputation: 1797
grub2 had ZERO issues when i put fedora 18 on a usb thumb drive
i even reinstalled it a few times using different settings - to learn the NEW installer

mater of fact
the fedora18 installer automatically picked the usb drive to install grub on

it was one of the easiest usb installs i ever did
PS. i do not recommend fedora to any one who wants a MS windows replacement
seeing as it is a Research and Development TESTING distro
 
Old 03-19-2013, 01:46 AM   #9
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
grub2 had ZERO issues when i put fedora 18 on a usb thumb drive
i even reinstalled it a few times using different settings - to learn the NEW installer

mater of fact
the fedora18 installer automatically picked the usb drive to install grub on

it was one of the easiest USB installs i ever did
PS. i do not recommend fedora to any one who wants a MS windows replacement
seeing as it is a Research and Development TESTING distro
I might give that a shot. At least to see if its grub install will work. I don't really need a complete windows replacement anyway. 99% of what it will be used for is web access and file access from secure network shares. I just want a completely separate, secure, and easily 'disposable' environment.
 
Old 03-19-2013, 03:28 PM   #10
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Original Poster
Rep: Reputation: 15
Update.

I just tried
Code:
sudo grub-install --root-directory=/mnt/sdc1 /dev/sdc
and
Code:
install-mbr /dev/sdc
Both ran and completed with out errors, but still no change in the situation. No booting.

At this point I'm thinking I need to isolate where the MBR in the Live disk differs from what all the various utility installs. It looks like grub isn't even touched, so I'm thinking its all in the MBR or maybe some sort of partition flag. The Live mode installer drive is diffidently doing something different than the OS Installer in the boot sector

Does the the root directory need the boot flag?

Is there a way to read, check and/or copy the MBR from one drive to another?

How is the Live-mode USB different form a standard install with regards to its boot information?
 
Old 03-20-2013, 01:01 AM   #11
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Original Poster
Rep: Reputation: 15
Progress!! Sort of...

I went into gparted and enabled the boot flag on the root partition (none of the installers did this automatically). That got the computer to boot to the flash drive! However it boots to a blank screen. After the OEM bioes screen it just goes black and hangs there. For once I would like it to give me a damn error message or something, but no, just emtpy black blankness. Any ideas?
 
Old 03-21-2013, 02:50 PM   #12
dogpatch
Member
 
Registered: Nov 2005
Location: Central America
Distribution: Mepis, Android
Posts: 175
Blog Entries: 1

Rep: Reputation: 19
A year ago i was trying to do this very thing, and got a partial solution by installing AntiX (a scaled-down Debian) onto a usb flash drive. With AntiX i did get a bootable usb flash drive, but had some issues with the shutdown not cleanly unmounting the boot partition, thereby making subsequent boots a problem. (View that thread here.) AntiX also gave me the easiest way to make a live-boot usb, which is what i've been using since.

Mostly i have posted this so as to be subscribed to the thread, because I would also love to know how to skin this particular cat.

Last edited by dogpatch; 03-21-2013 at 03:00 PM. Reason: added link to related thread
 
Old 03-27-2013, 12:32 AM   #13
Teckno
Member
 
Registered: May 2004
Location: Why do you want to know?
Posts: 82

Original Poster
Rep: Reputation: 15
well it looks like its all a UEFI issue. Out of all the distros I tried, OpenSUSE is the only one to properly detect and set up the disk to be bootable from a UEFI system. it set the MBR to GPT and added a separate special efi boot partition. and it worked. only problem after that was that even USB 3.0 is still not fast enough for the OS.
 
  


Reply

Tags
boot, grub, linux, liveusb, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB boot problem flashdrive and hdd installed linux oldrifle Linux - Laptop and Netbook 8 11-12-2014 04:17 PM
[SOLVED] how to boot to a Linux iso file image when installed onto a USB external hard drive ? james2b Linux - Newbie 2 11-30-2009 01:26 AM
cant boot dam small installed on usb BluDawg Linux - Kernel 2 12-25-2008 01:14 AM
cant boot dam small installed on usb BluDawg Linux - Kernel 3 12-23-2008 04:27 AM
Installed From USB over network - wont boot without USB plugged in. james_2002uk Linux - Newbie 2 06-05-2007 06:35 PM


All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration