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
Failing to boot from SDB1
Failing to boot from SDB1
I've burnt the <debian-live-9.5.0-amd64-cinnamon.iso> on a USB stick and booted my NUC to start installation.
Then I inserted another USB stick to install Debian on it permanently.
The installation went smoothly not enforcing EEFI with GRUB. The USB's were recognised by the live system as SDA and SDB respectively.
After the installation completed, I removed the source USB (SDA) and tried to boot from the target USB (SDB)
The computer boots, but then gets into kernel panic and drops into shell reporting "no SDB1 was been found"
Apparently, after I remove the source USB and leave the target USB in, Debian assigns it as SDA and fails to find OS because during installation it was on SDB1
How can I edit the boot script to change the hard-coded path to SDB1 entry in the environment variables?
Then I inserted another USB stick to install Debian on it permanently.
The installation went smoothly not enforcing EEFI with GRUB. The USB's were recognised by the live system as SDA and SDB respectively.
After the installation completed, I removed the source USB (SDA) and tried to boot from the target USB (SDB)
The computer boots, but then gets into kernel panic and drops into shell reporting "no SDB1 was been found"
Apparently, after I remove the source USB and leave the target USB in, Debian assigns it as SDA and fails to find OS because during installation it was on SDB1
How can I edit the boot script to change the hard-coded path to SDB1 entry in the environment variables?
Re: Failing to boot from SDB1
i don't think it's hardcoded.
also, unix-like systems are case sensitive. sdb1 != SDB1.
i don't understand why you need 2 USBs? why don't you just install from one USB, and make sure grub is installed to the internal hard disk?
also, unix-like systems are case sensitive. sdb1 != SDB1.
i don't understand why you need 2 USBs? why don't you just install from one USB, and make sure grub is installed to the internal hard disk?
-
- Posts: 1405
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: Failing to boot from SDB1
First, next time insert as 1st that USB on which you will install Linux and the insert USB from which
you will install Linux and after will be removed.
Second, take care that Grub is installing on 1st USB.
Peter.
you will install Linux and after will be removed.
Second, take care that Grub is installing on 1st USB.
Peter.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
The computer cannot get into kernel panic and drop into shell at the same time. It is either one or the other, not both.BPR wrote:The computer boots, but then gets into kernel panic and drops into shell reporting "no SDB1 was been found"
When there is no initrd/initramfs and the kernel is in charge of mounting the root filesystem but fails to do so, it gets into kernel panic. When there is an initrd/initramfs in charge of mounting the root filesystem but fails to do so, it drops into to a shell.
The root filesystem specification is recorded in the boot loader configuration and passed to the kernel command line in the root= parameter. Normally it uses the filesystem UUID instead of the device node name because the latter is not stable. But for a reason yet unknown to me, sometimes after the installation it happens that /boot/grub/grub.cfg contains the device name instead of the UUID. This is usually fixed by running update-grub from the installed system. In order to boot properly the first time, you can modify the root= parameter in the boot menu entry with GRUB's embedded editor (type "e" and follow instructions).
Last edited by p.H on 2018-10-11 11:07, edited 1 time in total.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
It is, in /boot/grub/grub.cfg. Otherwise where would it come from ?debiman wrote:i don't think it's hardcoded.
Last edited by p.H on 2018-10-11 11:08, edited 1 time in total.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
It is not that simple. The source device must obviously be inserted before booting, because you want to boot from it. So inserting the target device first just means that both devices are already inserted before booting the kernel. In this situation the device names only depend on the discovery order by the kernel. The kernel does not care which device was inserted first before it was booted.peter_irich wrote:next time insert as 1st that USB on which you will install Linux and the insert USB from which
you will install Linux and after will be removed.
If you want the target device to be sda, you can try to swap the USB devices and ports, in hope that the discovery order is tied to USB ports. Or you can do this :
- insert the source device and boot the installer
- while the installer asks the first question about language, remove the source device (not mounted yet)
- insert the destination device -> becomes sda
- insert the source device again -> becomes sdb
- resume the installation procedure
Re: Failing to boot from SDB1
B/c I don't have a hard disk and like to boot from different USB's ? or, should I say usb's ...debiman wrote:i don't understand why you need 2 USBs? why don't you just install from one USB, and make sure grub is installed to the internal hard disk?
Re: Failing to boot from SDB1
Yes, it's clearly a bug - this should use the UUID of the USB stick.p.H wrote:The root filesystem specification is recorded in the boot loader configuration and passed to the kernel command line in the root= parameter. Normally it uses the filesystem UUID instead of the device node name because the latter is not stable. But for a reason yet unknown to me, sometimes after the installation it happens that /boot/grub/grub.cfg contains the device name instead of the UUID. This is usually fixed by running update-grub from the installed system. In order to boot properly the first time, you can modify the root= parameter in the boot menu entry with GRUB's embedded editor (type "e" and follow instructions).
I would like to fix the boot sector on the target USB, as you say "fixed by running update-grub from the installed system." How do I do that?
When it bombs out at boot, it goes to some shell CLI prompt, shall I hit "e" ? What's the path to the grub's config file where it has this entry, root=
And thank you for NOT being an incompetent prick lecturing me about case-sensitive acronyms
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
Please read me carefully. The boot sector does not need to be fixed. /boot/grub/grub.cfg does.BPR wrote:I would like to fix the boot sector on the target USB
Please read me carefully. Press "e" at the GRUB boot menu.BPR wrote:How do I do that?
When it bombs out at boot, it goes to some shell CLI prompt, shall I hit "e" ?
When the initramfs shell is started, it is already too late.
You might create a (volatile) symlink /dev/sdb1 pointing to /dev/sda1 as a temporary workaround and press Ctrl+d to resume boot, but this is really ugly.
Code: Select all
ln -s /dev/sda1 /dev/sdb1
Please read me carefully. I mentioned the full path.BPR wrote: What's the path to the grub's config file
Last edited by p.H on 2018-10-07 12:28, edited 1 time in total.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Failing to boot from SDB1
Did the OP even try ?
How to run update-grub on a installed Debian system
===========
On Debian What's the path to the grub config file where it has this entry, root=
The very first hit:
Please Read.. What we expect you have already Done.
Also it would be nice if the OP reads this :
Forum guidelines. Please read before first post!
How to run update-grub on a installed Debian system
===========
On Debian What's the path to the grub config file where it has this entry, root=
The very first hit:
Please make at least some effort to find answers yourself, and before calling me a incompetent prick, as well, read this:Grub - Debian Wiki
https://wiki.debian.org/GrubProxy Highlight
18 Oct 2015 ... GRUB is the GRand Unified Bootloader, a very powerful newish ...
The configuration file is /boot/grub/grub.cfg, but you shouldn't edit it directly. ... insta
Please Read.. What we expect you have already Done.
Also it would be nice if the OP reads this :
Forum guidelines. Please read before first post!
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
-
- Posts: 1405
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: Failing to boot from SDB1
But when you are installing system from usb-stick or from DVD on HDD or SSD in your computer,p.H wrote:It is not that simple. The source device must obviously be inserted before booting, because you want to boot from it. So inserting the target device first just means that both devices are already inserted before booting the kernel. In this situation the device names only depend on the discovery order by the kernel. The kernel does not care which device was inserted first before it was booted.peter_irich wrote:next time insert as 1st that USB on which you will install Linux and the insert USB from which
you will install Linux and after will be removed.
target device already is in computer. You can choice boot order in BIOS SETUP.
Peter.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
The BIOS/UEFI boot order has no effect on the discovery order by the Linux system.
Even when booting from USB, sda is almost always the internal ATA disk because the USB mass storage driver adds a 1-second delay when detecting a device.
Even when booting from USB, sda is almost always the internal ATA disk because the USB mass storage driver adds a 1-second delay when detecting a device.
Re: Failing to boot from SDB1
if that's your definition of hardcoded i rest my case.p.H wrote:It is, in /boot/grub/grub/cfg. Otherwise where would it come from ?debiman wrote:i don't think it's hardcoded.
anyhow, i meant it's not hardcoded in the installer, in other words one gets a choice.
the problem is simple; if there's no hard drive in the machine, debian must install the bootloader to one of the two USBs.
apparently the wrong one was chosen.
even so, garyricketson pointed out a possible fix.
Re: Failing to boot from SDB1
1) It IS hard-coded. When I installed OS from USB, it recognised itself as sda and the target USB - as sdbdebiman wrote:if that's your definition of hardcoded i rest my case.p.H wrote:It is, in /boot/grub/grub/cfg. Otherwise where would it come from ?debiman wrote:i don't think it's hardcoded.
anyhow, i meant it's not hardcoded in the installer, in other words one gets a choice.
the problem is simple; if there's no hard drive in the machine, debian must install the bootloader to one of the two USBs.
apparently the wrong one was chosen.
even so, garyricketson pointed out a possible fix.
at the end of install it asked me where to install GRUB - onto sda or to sdb, and i chose sdb (my new boot drive
so it HARD coded onto the target boot USB that it's assigned as sdb1 assuming that source USB with ISO will be always stuck into my USB port. But it's not, and as soon as I boot from target USB it's assigned sdA. This should be dynamic and OS should boot from where it boots from, and not from where Grub config has been written (i.e. sdB)
2) Okay, I get to the grub> prompt booting from the boot disk (now sdA)
what do I need to type exactly, to edit the Grub config on it and overwrite sdb1 to sda1 (or dev/sda ?)
Thank you
Re: Failing to boot from SDB1
Update
at grub> I typed
grub> root=/dev/sda1
grub> exit
pressed [escape]
screen turned black, then back to boot splash. Now it says "Loading initial ramdisk" ... and it's hung
What is the use case for hard-coding the boot device into grub config, anyway??
Like, "I boot from a USB, but my OS is on my hard drive"?
at grub> I typed
grub> root=/dev/sda1
grub> exit
pressed [escape]
screen turned black, then back to boot splash. Now it says "Loading initial ramdisk" ... and it's hung
What is the use case for hard-coding the boot device into grub config, anyway??
Like, "I boot from a USB, but my OS is on my hard drive"?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
Three things are not to be confused.
- the boot device : device from which GRUB is booted as specified in the grub-install command.
- the GRUB root device : device where GRUB looks for files, as specified in the "root" GRUB environment variable, in GRUB syntax such as root=(hd0,1)
- the Linux root device : device which contains the root filesystem, as specified in the "root" kernel parameter, in Linux syntax such as root=/dev/sdb1 or root=UUID=xxx
Here the problem is in the root kernel parameter, not the root GRUB variable.
To correct it, don't start the GRUB shell (with "c").
At the GRUB menu, select desired menu entry (don't validate it) and press "e" to edit it. Note that any modification done is volatile, nothing is written on disk.
Look for a line starting with the keyword "linux". It should contain "root=/dev/sdb1".
Move the cursor to the line and replace "sdb1" with "sda1". Then press F10 to boot.
The system should start correctly. Then you can open a session, get a root shell and run update-grub to generate a correct /boot/grub/grub.cfg.
Check that the new grub.cfg has "root=UUID=xxx" in the "linux" commands instead of "root=/dev/sdb1".
- the boot device : device from which GRUB is booted as specified in the grub-install command.
- the GRUB root device : device where GRUB looks for files, as specified in the "root" GRUB environment variable, in GRUB syntax such as root=(hd0,1)
- the Linux root device : device which contains the root filesystem, as specified in the "root" kernel parameter, in Linux syntax such as root=/dev/sdb1 or root=UUID=xxx
Here the problem is in the root kernel parameter, not the root GRUB variable.
To correct it, don't start the GRUB shell (with "c").
At the GRUB menu, select desired menu entry (don't validate it) and press "e" to edit it. Note that any modification done is volatile, nothing is written on disk.
Look for a line starting with the keyword "linux". It should contain "root=/dev/sdb1".
Move the cursor to the line and replace "sdb1" with "sda1". Then press F10 to boot.
The system should start correctly. Then you can open a session, get a root shell and run update-grub to generate a correct /boot/grub/grub.cfg.
Check that the new grub.cfg has "root=UUID=xxx" in the "linux" commands instead of "root=/dev/sdb1".
Re: Failing to boot from SDB1
Ha! I bet you didn't expect this from me, but it worked! All fixed now
Except I had to press "e" on the splash screen, it opened the Grub screen, I found the "linux" line towards the bottom, replaced hdb1 with hda1, then pressed F10 to reboot- and .. ta-da!
Thank you so much! Thank you for your patience! You're a legend mate!!
One small problem - I went to check the "Install Packages" (Glib?) and it's empty - nothing at all. How do I load them up into the system?
Except I had to press "e" on the splash screen, it opened the Grub screen, I found the "linux" line towards the bottom, replaced hdb1 with hda1, then pressed F10 to reboot- and .. ta-da!
Thank you so much! Thank you for your patience! You're a legend mate!!
One small problem - I went to check the "Install Packages" (Glib?) and it's empty - nothing at all. How do I load them up into the system?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Failing to boot from SDB1
How did you "check the install packages" ? Did you run a Gnome thing (which I know nothing about) ?
I also wanted to warn about installing a standard system (not a live system) on USB thumb drives or SD cards because they do not have the same write endurance as SSDs and hard drives and may wear out fast.
I also wanted to warn about installing a standard system (not a live system) on USB thumb drives or SD cards because they do not have the same write endurance as SSDs and hard drives and may wear out fast.
Re: Failing to boot from SDB1
I was referring to Gdebi Package Installer - apparently there's no library for that, the packages must come pre-packaged with some flavours of Linux only.
Yes, I'm aware of the waring out of USB's
Basically, I'm trying to build a simple home theatre system with
Samba
mini-DLNA
VLC or Kodi
* I don't like the LibreElec (Transmission doesn't work on it)
Yes, I'm aware of the waring out of USB's
Basically, I'm trying to build a simple home theatre system with
Samba
mini-DLNA
VLC or Kodi
* I don't like the LibreElec (Transmission doesn't work on it)