Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Installing Linux (Debian) on a USB external hard drive

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
iamroot
Posts: 3
Joined: 2016-01-13 09:57

Installing Linux (Debian) on a USB external hard drive

#1 Post by iamroot »

Sorry for the long post or if I missed an already answered question. Okay...To be clear from the beginning so that nobody misunderstands my question - what I do NOT want to do is...:

1) Run Linux from a Live CD or USB key (even with persistence on)

2) Dual boot 2 different OS from 1 hard drive

3) Run a linux virtual machine

4) Or add a bootloader on my laptop's internal HDD where I can choose between Win7 or the USB drive

My old Linux desktop decided to quit for good and now I am trying to install a full fledged Debian (Jessie) system on my 450GB West. Dig. Elements USB hard drive (reason being my laptop's HDD is full so I can't/don't have time to install an VM linux). Planning to plug it into my laptop whenever i need to (laptop already has Win7 so I don't wanna touch that part) and maybe make it portable.

I burned the .iso file to a disc, booted my laptop with the disc, then installed Debian using the installer (only this time i selected my USB HDD instead of my laptop's internal one). I told the installer to install GRUB on the USB HDD (/dev/sdb in my case).

Now booting always fails ("Operating system not found"). I read somewhere that USB devices can only boot in FAT32 so I tried installing /boot in a FAT32 partition but it won't let me. So I next tried to create a dummy empty boot partition with the boot flag set. same error.

I don't think its my BIOS boot settings because the Live USB key booted without a problem. Also another thing I tried was installing Debian on the same USB key in which I burned the Live .iso previously. I assumed it was going to work but I see the same error as with my USB HDD.

So it seems like my problem is booting from any USB media, I think i missed some crucial steps. Cant find the solution by googling, most tutorials address Live USB installation issues, not this. Any ideas?

User avatar
argorain
Posts: 58
Joined: 2014-04-15 05:31
Location: CR
Contact:

Re: Installing Linux (Debian) on a USB external hard drive

#2 Post by argorain »

I have some questions on you.
Who yells "Operating system not found."? Grub? Or bios?
If it is grub, it seems to me like partition naming issue, but it is just a wild guess.
Another idea is position of boot partition. In most cases is expected for this partition to be at address 0 (e.g. at begging of drive), so check that.
Those ideas are just gusses. If something else comes into my mind, I'll write it there.
Good luck.
Vojtech "Rain" Vladyka

spacex
Posts: 637
Joined: 2015-01-17 01:27

Re: Installing Linux (Debian) on a USB external hard drive

#3 Post by spacex »

You need to abort the boot with F12 or whatever enters the bios boot-options, and then select to boot from the usb-hdd. You could also permanently change the bios boot-order, and set it to boot from usb-hdd first. Then it will boot from the usb-hdd when it's present, and from the internal hdd when it's not.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Installing Linux (Debian) on a USB external hard drive

#4 Post by kiyop »

Try spacex's suggestion first.

I wonder if you did wrong things.
There are many possible causes.
It was reported that installation of debian using live media fails in installing grub2 code onto USB media.
Are you sure that the laptop boots with BIOS (not with UEFI)?
You may be able to boot the installed debian by using Super Grub2 Disk: http://www.supergrubdisk.org/super-grub2-disk/
When the USB drive is not connected to the laptop, Windows 7 boots, doesn't it?
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

iamroot
Posts: 3
Joined: 2016-01-13 09:57

Re: Installing Linux (Debian) on a USB external hard drive

#5 Post by iamroot »

Its working now. Seems like GRUB was missing somehow. The Debian installer said it detected my Win7 on my internal HDD and asked if I wanted to install GRUB there in sda. I said no way, then in the next screen it asked where I wanted GRUB to go. I pointed it to /dev/sdb my USB HDD so I assumed the bootloader would go there.

after I treid this:

mount /dev/sdb4 /mnt/1
grub-install --root-directory=/mnt/1 /dev/sdb4

everything worked liked magic!!

I guess it would have worked if I unplugged my laptop's HDD in the beginning though I didn't try this.

Thanks!

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Installing Linux (Debian) on a USB external hard drive

#6 Post by kiyop »

iamroot wrote:Its working now.
Congratulations! :)
iamroot wrote:Seems like GRUB was missing somehow.
(snip by kiyop)
grub-install --root-directory=/mnt/1 /dev/sdb4

everything worked liked magic!!
Did you really execute "grub-install" command with the last option: /dev/sdb4?
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

iamroot
Posts: 3
Joined: 2016-01-13 09:57

Re: Installing Linux (Debian) on a USB external hard drive

#7 Post by iamroot »

Whoops.. it was sdb without the 4

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Installing Linux (Debian) on a USB external hard drive

#8 Post by kiyop »

iamroot wrote:Whoops.. it was sdb without the 4
I guessed so. ;)
Thank you for replying. :)
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply