Grub Entry for USB External Drive [SOLVED]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Grub Entry for USB External Drive [SOLVED]

Post by jp734 »

Have a PC with two SSD (sda and sdb) and I'm trying to use a USB external hard drive for testing distros (sdc). I created a grub entry (see below) and keep getting "no such device" / "no such partition" error. I've triple checked my UUID to make sure it's correct. New distro is on sdc1. What am I missing?

menuentry 'New Distro (sdc1/ext4)'{
set root=(hd2,0) ( also tried " set root=uuid=f1098091-10d0-4691-b16f-9dd890955a58" )
search --no-floppy --set=root --fs-uuid f1098091-10d0-4691-b16f-9dd890955a58
linux /vmlinuz root=uuid=f1098091-10d0-4691-b16f-9dd890955a58 psubdir=/new_distro pmedia=ataflash
initrd /initrd.gz
}

When booting and I hit F12 for boot options, the external usb drive shows up on the list

Last edited by jp734 on Sat Jul 27, 2024 12:14 pm, edited 1 time in total.

The Art of Magic and The Magic of Art

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1983 times

Re: Grub Entry for USB External Drive

Post by mikewalsh »

@jp734 :-

Hmm. Sounds familiar, somehow...

Haven't done so for a while, but going back several years when I was still running Ubuntu and a few of the 'flavours' from the internal drive on the old Compaq desktop rig, I'd just bought a Seagate external USB 3.0 portable HDD. Around the same time, I discovered ZorinOS.....and decided to install it to the Seagate portable HDD.

The Compaq predated USB 3.0. This machine was USB 2.0-only. I found ZorinOS would boot from the USB 2.0 ports, but it WAS rather slow. I decided to try and take advantage of the extra speed of a USB 3.0 connection, so accordingly I obtained a USB 3.0 adapter card that fitted in a PCIe slot. Using the Seagate through this adapter worked fine if I used it purely as a data drive.......but when trying to boot an OS from it - plugged into the adapter card - all I kept getting was the exact same message you're getting.

I found out why. Quite simply, the adapter card's controller chip didn't support booting. At ALL. From any sort of OS. So.....

.....I'm curious as to your setup. I presume you're trying to boot from this external HDD?/SSD? while plugged into a USB 3.0 port on your machine, yes? If the 'puter is under 8 or 9 years old, then USB 3.0 should be standard fitment (and the onboard USB 3.0 root hub controller should natively support booting from USB 3.0).

Can we have a wee bit more detail, please?

Mike. ;)

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

mikewalsh wrote: Thu Jul 25, 2024 3:09 pm

.....I'm curious as to your setup. I presume you're trying to boot from this external HDD?/SSD? while plugged into a USB 3.0 port on your machine, yes? If the 'puter is under 8 or 9 years old, then USB 3.0 should be standard fitment (and the onboard USB 3.0 root hub controller should natively support booting from USB 3.0).

Can we have a wee bit more detail, please?

Mike. ;)

Your presumption is correct, except per lsusb, it is 2.0. BIOS gives usb booting as an option and it does when I hit F12 on boot so I should be able to even if it's not 3.0, correct? FYI, I'm using a Rosewill sata to usb enclosure similar to this.

Attachments
satatousb.jpg
satatousb.jpg (11.09 KiB) Viewed 1458 times

The Art of Magic and The Magic of Art

User avatar
bigpup
Moderator
Posts: 6999
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: Grub Entry for USB External Drive

Post by bigpup »

Are you trying to select the external drive as the boot device to use and using a Grub boot loader that is on it?

Or is the boot loader on one of the internal drives.
You boot from it and are trying to use a Grub menu entry, you made to select, and boot the external drive?

What Puppy version is on this external drive?

Is it a frugal install?

What is the name of the frugal install directory(folder)?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

@bigpup no grub installed on the external drive. I'm using the grub on sda and created an entry there. At the moment, I'm trying bionic with copied files extracted from iso. Files are saved under / but I don't think that's the issue at this point (and I need to edit my psubdir entry). Right now it's not detecting the device/partition.

The Art of Magic and The Magic of Art

esos
Posts: 191
Joined: Thu Feb 18, 2021 4:33 am
Been thanked: 20 times

Re: Grub Entry for USB External Drive

Post by esos »

@jp734
Can you pls run blkid from terminal?
and let us see it.

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

@esos per your request

Attachments
Screenshot(10).jpg
Screenshot(10).jpg (91.44 KiB) Viewed 1414 times

The Art of Magic and The Magic of Art

esos
Posts: 191
Joined: Thu Feb 18, 2021 4:33 am
Been thanked: 20 times

Re: Grub Entry for USB External Drive

Post by esos »

Just try this:
menuentry 'New Distro (sdc1/ext4)'{
search --no-floppy --set=root --fs-uuid f1098091-10d0-4691-b16f-9dd890955a58
linux /new_distro/vmlinuz psubdir=/new_distro pmedia=ataflash
initrd /new_distro/initrd.gz
}

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

Same result @esos - "no such device"

The Art of Magic and The Magic of Art

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

Re: Grub Entry for USB External Drive

Post by williwaw »

the stanza esos seems more concise
suprised no change.

please post the version of grub2 you see on the boot menu and tell us more about how and when you installed grub2
possibly an update is in order for use with ext4?

User avatar
wizard
Posts: 1987
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 693 times

Re: Grub Entry for USB External Drive

Post by wizard »

@jp734

Try running the same test, but use a USB flash drive instead of the USB hdd.

wizard

Big pile of OLD computers

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

williwaw wrote: Thu Jul 25, 2024 8:16 pm

the stanza esos seems more concise
suprised no change.

please post the version of grub2 you see on the boot menu and tell us more about how and when you installed grub2
possibly an update is in order for use with ext4?

@williwaw - I used to have a grub menu created using bionicpup but recently updated using bookwormpup 10.0.7 but can get it next time I reboot.

wizard wrote: Thu Jul 25, 2024 8:31 pm

@jp734

Try running the same test, but use a USB flash drive instead of the USB hdd.

wizard

@wizard That's a great idea. Will definitely do that. :thumbup:

The Art of Magic and The Magic of Art

vektor_alian
Posts: 55
Joined: Thu Apr 01, 2021 12:36 am
Been thanked: 14 times

Re: Grub Entry for USB External Drive

Post by vektor_alian »

I had a computer that would not boot from 1 of the 3 usb ports.

Vektor

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1983 times

Re: Grub Entry for USB External Drive

Post by mikewalsh »

@jp734 :-

Y'know, this is starting to look more and more like it's to do with the "bridge" card. I'm assuming this is a 2.5-inch HDD - one of the small ones you can put in your pocket - like a WD 'MyPassport' or summat similar?

These things have what's known as a "bridge card", plugged-in to the HDD's SATA ports ('cos it's a bog-standard 2.5-inch SATA HDD inside that fancy casing), which 'converts' the signalling from the SATA format into something that USB 3.0 can use. And, sad to say, some of the things never WILL boot any OS.....because the "bridge card"'s controller chip simply doesn't support it.

That's MY guess, though I could of course be WAY off... :roll:

Mike. Image

User avatar
wizard
Posts: 1987
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 693 times

Re: Grub Entry for USB External Drive

Post by wizard »

@mikewalsh
@jp734

That's MY guess, though I could of course be WAY off.

Yes, that's why I suggested JP run a test with a USB flash. The bios will support USB booting, but Grub does not recognize the USB hdd bridge.

If that's the case, it can probably still be booted using a "split boot" setup as described in post #3 here:
viewtopic.php?p=119070&hilit=nvme#p119070

wizard

Last edited by wizard on Thu Jul 25, 2024 10:53 pm, edited 1 time in total.

Big pile of OLD computers

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

Re: Grub Entry for USB External Drive

Post by williwaw »

jp734 wrote: Thu Jul 25, 2024 8:44 pm

I used to have a grub menu created using bionicpup but recently updated using bookwormpup 10.0.7 but can get it next time I reboot.

this cable (without a chip?) works here for me
https://www.amazon.com/s?k=USB3S2SAT3CB
if you rule out the "brIdge card" and decide to update grub,
frugalpup (with gyrogs update) has the most recent Iv'e found
viewtopic.php?t=10028

User avatar
wizard
Posts: 1987
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2652 times
Been thanked: 693 times

Re: Grub Entry for USB External Drive

Post by wizard »

@williwaw
@jp734

this cable (without a chip?)

Nope, still has a bridge circuit, just no case

wizard's rule #12 "All computer hardware is not created equal"

wizard

Big pile of OLD computers

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

mikewalsh wrote: Thu Jul 25, 2024 9:18 pm

@jp734 :-

Y'know, this is starting to look more and more like it's to do with the "bridge" card. I'm assuming this is a 2.5-inch HDD - one of the small ones you can put in your pocket - like a WD 'MyPassport' or summat similar?

These things have what's known as a "bridge card", plugged-in to the HDD's SATA ports ('cos it's a bog-standard 2.5-inch SATA HDD inside that fancy casing), which 'converts' the signalling from the SATA format into something that USB 3.0 can use. And, sad to say, some of the things never WILL boot any OS.....because the "bridge card"'s controller chip simply doesn't support it.

That's MY guess, though I could of course be WAY off... :roll:

Mike. Image

@mikewalsh It's a 3.5" HDD and your hunch is a very big possibility. I decided to open to see what's inside. It's been a while since I installed the hard drive and yes, there is a bridge card. And I did forget it also comes with an eSATA connection. Maybe I can try that and see what happens. Will look for some cable.

Attachments
pic4.jpg
pic4.jpg (28.65 KiB) Viewed 1301 times
pic3.jpg
pic3.jpg (33.65 KiB) Viewed 1301 times
pic1.jpg
pic1.jpg (28.54 KiB) Viewed 1301 times
Last edited by jp734 on Fri Jul 26, 2024 12:51 am, edited 1 time in total.

The Art of Magic and The Magic of Art

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

wizard wrote: Thu Jul 25, 2024 10:43 pm

@williwaw
@jp734

this cable (without a chip?)

Nope, still has a bridge circuit, just no case

wizard's rule #12 "All computer hardware is not created equal"

wizard

I agree with @wizard here. USB cables only have 4 pins and SATA has more than that. Probably at least 10. So there has to be a circuit that converts all those data signals. (Just my un-technical me gut feeling). I will still test with the flash drive Wizard

The Art of Magic and The Magic of Art

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

vektor_alian wrote: Thu Jul 25, 2024 9:12 pm

I had a computer that would not boot from 1 of the 3 usb ports.

Vektor

I tried every port. No luck :|

The Art of Magic and The Magic of Art

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1983 times

Re: Grub Entry for USB External Drive

Post by mikewalsh »

@williwaw :-

I've only once found a "special" SATA-to-USB 3.0 cable to be needed.

Shortly before the old Compaq desktop rig expired in early 2020, I'd treated her to a brand-new DVD/CD re-writer. This unit, a LiteOn tray-loader, was hardly used.......so I decided to re-purpose it as an "external" optical drive, because although the HP desktop rig does HAVE an optical drive, it's one of these dreadfully cheap, tacky, spring-loaded laptop-style ones (and the LiteOn is way better quality all round!) Plus, it lets me use my 'TrayControl' utility.....for both opening AND closing the drive-tray. (Gawd, aren't I lazy? :lol: )

I soon found that wizard's 'rule no #12' applied here. Apparently, for a computer to be able to boot from an external optical drive - even via SATA-to-USB - because of USB being involved, a special cable is needed that has an additional chip in the SATA end's controller board. In fact, without this extra chip, the drive won't even be recognised; something to do with the unique codecs & format recognition software used by optical drives.

I discovered this after purchasing 2 different cables, neither of which let the PC "see" the drive. I was determined to make this work, so some in-depth research eventually unearthed the required information on one of the many AV forums out there. Seems it was a more common problem than many folks realised.

After eventually tracking down the correct type of cable from one of the smaller, 'boutique'-type suppliers, the thing's worked perfectly ever since.....and because it's the better drive of the two, I have the LiteOn set in UEFI/BIOS as the "default" one to be used.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've utilised one of the other 2 "standard" cables in the 'external' conversion of the PATA/IDE SSD out of the old Inspiron lappie. That works fine for a 'normal' drive.....and because it's an SSD, the additional 'power-supply' cable that comes with many of these isn't required.

Mike. Image

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 371 times

Re: Grub Entry for USB External Drive

Post by williwaw »

mikewalsh wrote: Fri Jul 26, 2024 3:33 am

I soon found that wizard's 'rule no #12' applied here.

I bought mine at the local shop and told the shopowner what I was doing with the spinner HD so he steered me straight. never realized it had the chip until Wizard posted above, and it works fine for ssd drives also.

Last edited by williwaw on Sat Jul 27, 2024 6:07 pm, edited 1 time in total.
User avatar
bigpup
Moderator
Posts: 6999
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: Grub Entry for USB External Drive

Post by bigpup »

Not knowing for sure what kind of bios the computer has.

I would do this with the drive.

1st partition a small 300MB size, formatted fat32, flagged boot, esp.
The boot loader and its files go on it.
Nothing but the boot loader.

The rest of the drive any number of partitions and formatted whatever.

This is standard drive setup for UEFI bios and any legacy Bios, will always recognize a fat32 first partition, as the place to look for the boot loader.
The boot flag is for legacy bios or (UEFI in legacy mode) and the esp flag is for UEFI bios.

The drive will always be seen by the bios as a boot-able drive.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

bigpup wrote: Fri Jul 26, 2024 10:37 am

Not knowing for sure what kind of bios the computer has.

I would do this with the drive.

1st partition a small 300MB size, formatted fat32, flagged boot, esp.
The boot loader and its files go on it.
Nothing but the boot loader.

The rest of the drive any number of partitions and formatted whatever.

This is standard drive setup for UEFI bios and any legacy Bios, will always recognize a fat32 first partition, as the place to look for the boot loader.
The boot flag is for legacy bios or (UEFI in legacy mode) and the esp flag is for UEFI bios.

The drive will always be seen by the bios as a boot-able drive.

Good day gentlemen...and ladies ;)

Was thinking the same thing @bigpup . As a matter of fact, I've already done it but not sure if it's right. Because I had to shrink the one big partition (sdc1) a little bit to make a 300MB partition, the boot partition became sdc3. So if looking at gparted the sequence is as follows: sdc3, sdc1, sdc2. --- sdc3 being the 300mb and sdc1 and sdc2 splitting the rest of the drive space. I want to look for an extra drive to transfer what's in it and delete what I don't need before I reformat the disk. So I have a couple of test to try, yours and Wizard's but not going to be able to until this weekend. Have a Great Day everyone :thumbup:

The Art of Magic and The Magic of Art

LateAdopter
Posts: 122
Joined: Sat Aug 15, 2020 5:10 pm
Been thanked: 19 times

Re: Grub Entry for USB External Drive

Post by LateAdopter »

This problem sounds suspiciously like the issues trying to use trim and discard on a SATA SSD via a USB adapter on linux.

The underlying cause is that SATA uses SCSI commands. The USB adapter controller has to implement the SCSI commands that are needed. But the controllers implement the minimum set of commands to make the device work on Windows.

In the case of trim and discard, there were three levels of compatibility found on linux: Works OOTB, works if you enter the device parameters via sysfs, or doesn't work at all.

So it may be that there is a SCSI command needed during the boot process, e.g. to determine the disk parameters, that is not implemented by the controller.

LateAdopter
Posts: 122
Joined: Sat Aug 15, 2020 5:10 pm
Been thanked: 19 times

Re: Grub Entry for USB External Drive

Post by LateAdopter »

Since I have never done this before, I copied a puppy folder from an SD Card to a FAT32 SATA hard disk in a SATA to USB adapter.
I added it to the menu.lst on the PCs internal SSD.
It worked straight away.

This is my menu.lst entry, using label not uuid:

Code: Select all

title ImpPup64 Alpha lazy (sda1/imp96a)
  rootnoverify (hd1,0)
  kernel /imp96a/vmlinuz51421  pupsfs=XORO_PVR:/imp96a/puppy_imppup64_9.6.1.sfs zdrv=XORO_PVR:/imp96a/zdrv-fd51421.sfs psave=XORO_PVR:/imp96a/imppup64save-IMP.2fs pmedia=atahd psubdir=imp96a
  initrd /imp96a/early_ucode.cpio /imp96a/initrd2

It doesn't seem to need any black magic, but all of the paths are explicit. No find setroot.

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive

Post by jp734 »

Problem solved but with new challenge.

So, I cleaned the HD, re-formatted, installed grub and frugal installed puppy. Tried to boot, same error as last time. Then I thought of trying to boot from it using my laptop and voila, IT BOOTED! So, went back to my desktop, entered BIOS and changed from legacy to EUFI and bingo. Problem solved

New problem: With BIOS set to UEFI, desktop will now not boot from ssd. I figured if I'll boot from a flash drive with the bios set on uefi and re-install grub, it will solve my problem. So, I did but it didn't work. Still will not boot from SSD unless I change bios setting back to LEGACY.

All good for now, set bios back to LEGACY so I can boot from SSD and hopefully can figure something out later. Thanks gents. Enjoy your day/evening where ever you all are. Keep Puppying! :thumbup:

[EDIT] I did a quick check with gparted and I think I know what the problem why it will not boot with uefi set. Boot partition has a boot flag but it is formatted as NTFS. Planning on booting from a flash drive with bios set back to UEFI, then re-format the boot partition to fat32 and re-install grub. If you all think that's the right move, let me know. Thanks as always puppy buddies :D

The Art of Magic and The Magic of Art

User avatar
bigpup
Moderator
Posts: 6999
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: Grub Entry for USB External Drive [SOLVED]

Post by bigpup »

Yes do that, but is nothing on this ntfs formatted partition, but the boot loader?
If answer is no.
There is other things on the ntfs partition that you do not want to loose.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

dimkr
Posts: 2425
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: Grub Entry for USB External Drive [SOLVED]

Post by dimkr »

Maybe the SSD uses a BIOS partition table and not GPT? UEFI boot will only work with GPT.

User avatar
jp734
Posts: 204
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 96 times
Been thanked: 97 times

Re: Grub Entry for USB External Drive [SOLVED]

Post by jp734 »

dimkr wrote: Sat Jul 27, 2024 3:22 pm

Maybe the SSD uses a BIOS partition table and not GPT? UEFI boot will only work with GPT.

I'm afraid youre right. I re-formatted the boot partition to fat32 and re-installed grub but still the same. When I go to bios setup only the flash drive is listed under UEFI bootable device. Both SSD are under Legacy.

Since I cant create a new table without the data getting deleted, it would be easier and make more sense to create a new msdos table on the USB external drive

The Art of Magic and The Magic of Art

Post Reply

Return to “Users”