Debian on external hard drive not booting

Help with issues regarding installation of Debian

Debian on external hard drive not booting

Postby arli21 » 2017-10-24 10:00

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
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-24 10:35

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.
p.H
 
Posts: 155
Joined: 2017-09-17 07:12

Re: Debian on external hard drive not booting

Postby arli21 » 2017-10-24 10:38

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
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-24 11:12

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)
p.H
 
Posts: 155
Joined: 2017-09-17 07:12

Re: Debian on external hard drive not booting

Postby arli21 » 2017-10-24 11:18

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

Postby arli21 » 2017-10-24 11:36

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... :/
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-24 12:24

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.
p.H
 
Posts: 155
Joined: 2017-09-17 07:12

Re: Debian on external hard drive not booting

Postby arli21 » 2017-10-24 12:28

Could it be related to settings in my BIOS Setup ? Do you want me to send you available options?
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-24 14:05

Why not.
p.H
 
Posts: 155
Joined: 2017-09-17 07:12

Re: Debian on external hard drive not booting

Postby arli21 » 2017-10-24 14:58

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 ? :/
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-24 15:09

I'm afraid not. Isn't there some USB drive emulation mode setting, with choices such as hard disk, floppy, auto...
p.H
 
Posts: 155
Joined: 2017-09-17 07:12

Re: Debian on external hard drive not booting

Postby arli21 » 2017-10-24 16:25

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 :/
arli21
 
Posts: 7
Joined: 2017-10-24 09:49

Re: Debian on external hard drive not booting

Postby lostfarmer » 2017-10-24 17:08

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.
lostfarmer
 
Posts: 14
Joined: 2016-05-07 01:13
Location: Idaho

Re: Debian on external hard drive not booting

Postby p.H » 2017-10-25 07:05

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.
p.H
 
Posts: 155
Joined: 2017-09-17 07:12


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable