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

 

 

 

Debian on external hard drive not booting

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
arli21
Posts: 7
Joined: 2017-10-24 09:49

Debian on external hard drive not booting

#1 Post by arli21 »

Good afternoon !

I am trying to install Debian on my external HDD (4 TB), to use it with a regular BIOS (no UEFI). My HDD is partitionned in GPT like this :
- 1st partition : no filesystem, 1MB, bios_grub flag on Gparted, selected as boot partition (don't remember the exact name) during the Debian installation
-2nd partition : data, NTFS, not used during installation
-3rd partition : /home, 150 GB
-4th partition : /, 150 GB
-5th partition : SWAP, 8 GB

After the installation (I did select my external hard drive as the drive on which the installer should install GRUB), on boot, my computer detects my HDD but says "No Operation System found". I've already tried to reinstall GRUB with the rescue mode but it didn't help.

May I have some piece of advice? I can provide you any other information if needed.

Thanks a lot,

Arli21

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#2 Post by p.H »

Did you install GRUB in the MBR, not in a partition ?

Try to set the boot flag on the protective GPT partition in the MBR.

Code: Select all

parted /dev/sdX disk_set pmbr_boot on
Some BIOS firmwares require it to consider a drive is bootable.

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#3 Post by arli21 »

p.H wrote:Did you install GRUB in the MBR, not in a partition ?

Try to set the boot flag on the protective GPT partition in the MBR.

Code: Select all

parted /dev/sdX disk_set pmbr_boot on
Some BIOS firmwares require it to consider a drive is bootable.
I actually just selected my drive like /dev/sdx during the install, not a partition. Can I run parted from the reescue mode ? If yes, should I select "run shell in /dev/sdxX" in the rescue menu or "run shell in the installer environment" ?

Thanks

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#4 Post by p.H »

Yes, parted is available in rescue mode. Just run a shell in the installer environment or switch to a text console with Ctrl+Alt+F2.
You can also activate the protective MBR boot flag with fdisk by forcing the use of the DOS format.

Code: Select all

fdisk -t dos /dev/sdX
p (print table, shows the protective GPT partition)
a (toggle boot flag)
1 (partition number)
w (write)
q (quit)

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#5 Post by arli21 »

Ok, I am going to try this, but when I last tried Ctrl+alt+f2 it just launched BusyBox, which didn't have parted included. But anyway, I'm going to do with a shell in the installer env.

Thanks !

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#6 Post by arli21 »

I just tried this, on CTRL ALT F2 (finally it was working). The parted thing seemed to work, it just displayed a warning about updating the fstab, but when I rebooted I didn't manage to boot on the HDD ("Operation System not found"). So I tried again with the fdsik and I got this :

Code: Select all

Welcome to fdisk...
...
The size of the disk is 3.7 TiB (4000787029504 bytes). DOS partition table format can not be used in drives for volumes larger than 2119902325040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
And then, when i typed "p" :

Code: Select all

Disk /dev/sdb : 3.7 TiB ...
Units : sectors of 512 bytes
...
Disklabel type : dos
... 
Device         Boot     Start          End      Sectors     Size   Id      Type
/dev/sdb1       *           1   4294967295   4294967295        2T   ee      GPT
So I think something is misbehaving... :/

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#7 Post by p.H »

The warning about the size is normal. And the protective partition table is as expected after the parted command.
I don't know what's wrong. This trick has always worked for me on PCs with a broken BIOS.

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#8 Post by arli21 »

Could it be related to settings in my BIOS Setup ? Do you want me to send you available options?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#9 Post by p.H »

Why not.

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#10 Post by arli21 »

Ok. I have :
  • Intel(R) SpeedStep(tm) : Disabled
  • Virtualization : Enabled
  • Integrated NIC : Enabled
  • USB Emulation : Enabled
  • USB Powershare : Enabled
  • USB Wake Support : Enabled
  • SATA Operation : ANCI (the other choice is ATA)
  • External USB Ports : Enabled
  • eSATA Ports : Enabled
Can this help in some way ? :/

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#11 Post by p.H »

I'm afraid not. Isn't there some USB drive emulation mode setting, with choices such as hard disk, floppy, auto...

arli21
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

#12 Post by arli21 »

p.H wrote:I'm afraid not. Isn't there some USB drive emulation mode setting, with choices such as hard disk, floppy, auto...
No, nothing like that :/

lostfarmer
Posts: 19
Joined: 2016-05-07 01:13
Location: Idaho

Re: Debian on external hard drive not booting

#13 Post by lostfarmer »

to use it with a regular BIOS (no UEFI)
are you saying the comp does not have a EFI option , bios booting only ? If it is a old comp and the firmware is not GPT capable then it (may /will) not boot directly to a GPT only partitioned disk. You can try using a hybrid partitioned disk but it does have drawbacks. { I have used hybrid only on a MAC to boot MS Windows 7 } https://www.rodsbooks.com/gdisk/bios.html

Or you can try putting /boot on a bios partitioned hdd with / on the gpt disk, likely the easiest.
I suspect instead of /boot on the bios hdd , you could put only /boot/grub on the bios hdd. You would have to manually do that and manually edit the grub.cfg. I have used a dedicated grub only partition for years, but not to boot a gpt disk with MBR only bios.

The best way could depend on just what OS's you have on the internal hdd or if you want it to boot in other comps.
The make/mode , desktop,laptop (web site) may help use to know. How many usb outlet does the comp have ? (start the boot from a usb stick, mybe) The external is connected via usb ?

If it is MS Windows on internal hdd and you do not want normal grub, grub4dos might work(?).
Just listing what might work for you.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Debian on external hard drive not booting

#14 Post by p.H »

lostfarmer wrote: If it is a old comp and the firmware is not GPT capable then it (may /will) not boot directly to a GPT only partitioned disk
What does it mean that a BIOS firmware is GPT capable ?
AFAIK a BIOS firmware does not need to know anything about partition schemes such as GPT or DOS. BIOS boot only involves the boot code in the MBR, not the partition table.
lostfarmer wrote:I suspect instead of /boot on the bios hdd , you could put only /boot/grub on the bios hdd.
Separating /boot/grub requires that GRUB can read the drive(s) containing /boot. By default GRUB relies on the BIOS to read drives. But some BIOSes expose a USB drive through BIOS calls only when booting from that drive (as hd0). When booting from another drive, you need GRUB to use platform drivers to bypass the BIOS calls.

Post Reply