LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-27-2019, 06:33 PM   #31
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153

Quote:
I had the drive switched to a USB 2.0 port when the grub rescue dvd booted it. It's still there.
You should unplug it and re-connect it to a USB 3.0 port. Then repeat what you did previously. You need to find out if you can boot from a high-speed USB 3.0 port i.e. if there are any xhci issues.

Quote:
From the rescue dvd I can get a list of systems it sees to boot. I took a look to see what parameters it would use for the gpt drive but annoyingly the parameters are replaced by variables instead of a clear view of what would actually be used.
Is this the Super Grub2 rescue disk ?

https://www.supergrubdisk.org/super-grub2-disk/

Last edited by tofino_surfer; 07-27-2019 at 07:55 PM.
 
Old 07-27-2019, 10:09 PM   #32
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by tofino_surfer View Post
You should unplug it and re-connect it to a USB 3.0 port. Then repeat what you did previously. You need to find out if you can boot from a high-speed USB 3.0 port i.e. if there are any xhci issues.



Is this the Super Grub2 rescue disk ?

https://www.supergrubdisk.org/super-grub2-disk/
Well, now I can't get it to boot again,
neither USB 2.0 nor USB 3.0.
Yes, it's supergrubdisk. Supergrubdisk
is also acting up. It freezes up at seemingly
random times and is being undependable.
If it isn't one thing it's another. I've
given up for a while. I don't believe anything
is wrong with my motherboard because everything
was fine before I started messing about.
 
Old 07-28-2019, 06:57 AM   #33
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Possible workaround:

Hi,

A while ago I spent a some time looking at installing 64bit Linux onto 32bit UEFI tablets (64bit CPU/SOC). As an extension to this I also experimented with booting a Linux installation on the tablet's SDcard slot. Note: the card slot was not initialised by the firmware at boot time and required initialisation by the initrd. Some parallels here??

This is from a forum post/guide that I made at the time:
Quote:
In the example of a SD card installation, we know that the SD card slot will become available to the system shortly after the initial boot.
We also know how it will be identified by the system **when it is available**. The solution to the initial boot problem is to copy the kernel and initrd to the primary EFI partition. The Grub configuration file is simply altered to point to the these files in this location.
The system is now fully bootable when everything is configured in this way.
Initial grub.cfg for SDcard boot:
Code:
Modded for sdcard, kernel parameters are required for the Bay Trail SOC at this time.

menuentry 'Initial boot, update me' {
     insmod normal
     insmod gzio
     insmod part_gpt
     insmod ext2
     set root='hd1,gpt1' # The SDcard's EFI partition.
     linux /vmlinuz root=/dev/mmcblk1p2 noprompt noeject noefi nomodeset irqpoll clocksource=tsc reboot=pci,force  intel_idle.max_cstate=1
     initrd /initrd.img
     }
Obviously, you'll need different grub modules etc.

I'm wondering if you could use a similar mechanism to start the relevant initrd and kernel from your main disk, this should allow the USB3 hardware to be initialised properly.. Control should then be passed to the relevant system on the external drive..
The use of the EFI partition is irrelevant, you just need an accessible location (to Grub) on another drive.

I just wish that I had the required hardware to test this with..

Bodge99.

Last edited by bodge99; 07-28-2019 at 11:09 AM. Reason: Missed a bit..
 
Old 07-28-2019, 02:36 PM   #34
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Hi,

I must admit that I'm a little intrigued by this one... So much so that I've ordered a cheap PCIe USB3 card that appears to be xhci only.
I'll plug this into a spare legacy/MBR system so that I can then test booting methods using one of the USB3 ports.

I'll report what I find here..

Bodge99
 
Old 07-28-2019, 06:59 PM   #35
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
I tend to always use DOS partitioned sticks to avoid issues like these.

You can go to grubs command mode "c" and type commands like "ls" to see what it does see. You can also insmod things like "usb" and use ls to see if new stuff appears. If so, then add that insmod to your grub.cfg. You can use another grub to boot from another grub.cfg.

GRUB> configfile (hd1,0)/boot/grub/grub.cfg

YMMV.

UUIDs are partition specific.

# blkid
 
Old 07-28-2019, 08:03 PM   #36
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
you didn't happen to use one of the sub-menus of supergrub to boot the external drive, and/or revert some of your bios changes?
 
Old 07-28-2019, 08:12 PM   #37
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
I tend to always use DOS partitioned sticks to avoid issues like these.
What issues are you talking about ? Grub2's support for xhci USB3 controllers ? This isn't a DOS/GPT issue. The OP managed to boot their external MX Linux installation on a 4TB GPT drive using a USB2 port.

Quote:
I had the drive switched to a USB 2.0 port when the grub rescue dvd booted it. It's still there.
It hasn't worked from a USB3 port yet. USB3 controllers use xhci which grub2 doesn't support.

Also if you read the first post the OP has a 4TB external drive so they need to use GPT.

There is no issue with booting GPT on a legacy BIOS system. I have been doing it for 7.5 years with SATA SSDs. This is a USB3 issue.
 
1 members found this post helpful.
Old 07-29-2019, 01:06 AM   #38
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
If the OP switched their computer to use EFI firmware there would be an easy way around grub2 xhci issues. They could use EFI stub loading to load the kernel from the external drive without using a bootloader. They would have to create a FAT32 ESP on the GPT drive and place the kernels and initrd there as EFI needs FAT32. Since Linux itself has no problems with xhci once the kernel and initrd were loaded in memory it would then mount its root directory on the USB drive. EFI stub loading could either be done manually with efibootmgr commands or with rEFInd. rEFInd can also chainload grub-efi to boot Ubuntu on the main computer itself.

There is also the possibility of using EFI XHCI drivers with grub itself so EFI stub loading may not be needed.

https://unix.stackexchange.com/quest...ie-card/323080

However switching from legacy boot to EFI would require converting the main computer's drive from MBR format to GPT. This may mean making sure there is free space at the end of the drive for the backup table. You would then create a FAT32 ESP and install grub-efi.

Last edited by tofino_surfer; 07-29-2019 at 01:38 AM.
 
Old 07-29-2019, 03:26 AM   #39
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Hi,

The OP may not be able to use UEFI anything if the system is Legacy or set up as this...

I've been reading up on attempts to use EFI XHCI drivers with Grub. There seem to have been some successes, but some chipsets won't work reliably.
I'm guessing that the Grub guys aren't too bothered (yet) about a grub XHCI module due to the relatively low demand for USB3 booting.

I want to see if I can get this working on a Legacy system with minimal changes.

Bodge99
 
Old 07-29-2019, 06:04 AM   #40
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
There is no issue with booting GPT on a legacy BIOS system.
I have also done this with out no problems.
 
Old 07-29-2019, 06:35 AM   #41
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Colorpurple21859:

Hi, Normally I would agree with you.. but I've got a re-badged 2011 Clevo laptop that refuses to boot GPT at all..

Bodge99
 
Old 07-29-2019, 12:47 PM   #42
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Original Poster
Rep: Reputation: 54
I'm going to give it a rest for a while.
I still haven't solved my original issue
but after much messing around I can get
the gpt drive to boot using the supergrubdisk
dvd. It's back plugged into a USB 3.0
port. I also re-enabled UEFI and Legacy
boot in the bios but I don't know if that
matters. What I'm going to do is boot from
supergrubdisk dvd since it will boot all
installed systems. I have Ubuntu,
linuxfromscratch-8.0, linuxfromscratch-8.3,
and MX 18.3 Continuum on the gpt drive.
Supergrubdisk on the dvd is itself wonky,
freezing up at seemingly random times.
I would like to see the parameters that it is
using to boot gpt disk /dev/sdb1 and it has
a menu for viewing those but instead of
actual values it shows variables like $2,
$3, $4, $5 which are of no help at all.
Like this:
Code:
set root="$2"
set uuid="$3"
set kernel "$4"
set version="$5"
It's always something. To top it all off
the system time on the linuxfromscratch-8.3
system I use the most got reset to GMT when
I like local time. I fixed it after a couple
hours of work but I don't know how it got
changed.
Thanks all for the help.

Last edited by Terry Coats; 07-29-2019 at 12:55 PM.
 
Old 07-29-2019, 01:15 PM   #43
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
Hi, Normally I would agree with you.. but I've got a re-badged 2011 Clevo laptop that refuses to boot GPT at all..
If you mean that the firmware won't boot a GPT drive in legacy BIOS mode and automatically switches to EFI mode if it detects a GPT drive then this is a problem with that machine's firmware. I should probably change my statement to "There should be no issues booting GPT on a legacy BIOS system if the firmware is correct."

Fortunately the OP has a Gigabyte MB as I do and did manage to use the Super Grub2 rescue DVD to boot this drive when it was connected to a USB2 port.

Edit:

After reading the OP's latest message they did manage to boot this GPT drive from a USB3 port.

Quote:
I still haven't solved my original issue but after much messing around I can get the gpt drive to boot using the supergrubdisk dvd. It's back plugged into a USB 3.0 port. I also re-enabled UEFI and Legacy boot in the bios but don't know if that matters.

Last edited by tofino_surfer; 07-29-2019 at 01:50 PM.
 
Old 07-29-2019, 01:54 PM   #44
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Hi, No UEFI on this particular laptop.. Attempts to boot anything GPT fail spectacularly with any OS..

Bodge99
 
Old 07-29-2019, 01:58 PM   #45
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Hi, No UEFI on this particular laptop.. Attempts to boot anything GPT fail spectacularly with any OS..
was this using the bootloader on a msdos drive, or using a bootloader installed to mbr of gpt drive?

Last edited by colorpurple21859; 07-29-2019 at 02:01 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot floppy that tells computer to boot USB drive? General Debian 23 02-19-2014 09:55 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Grub File Not found Grub Rescue Error on External Sata to USB Drive imayneed Linux - Newbie 11 08-22-2012 02:56 AM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 04:46 PM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:58 AM.

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
Open Source Consulting | Domain Registration