SliTaz SliTaz Forum

You are not logged in.

#1 2024-03-15 22:58:51

Orby
Member
Registered: 2024-03-15
Posts: 8

Install to usb ssd fails boot error 17 cant mount partition

hi tazers!

made a cd, booted to it, installed to usb ssd chose sdb1 [ext4] as target, chose /dev/sr0 I think as cd ticked bootloader everything seemed fine 100%

Reboot, grub go! Er, no - cant boot as subject

Think the boot loader is being fooled by internal [dev/sda] hdd?

Tips?

Offline

#2 2024-03-16 08:58:26

shann
Administrator
Registered: 2011-04-01
Posts: 1,296
Website

Re: Install to usb ssd fails boot error 17 cant mount partition

Hi Orby,

infact grub4dos (used by default in tazinst) not work with ext4 filesystem.

For / (at least /boot) need ext3 fs hmm.

Tazinst need adjust to use grub2 in case of target as ext4.

For workaround you can use this after install SliTaz and no reboot :

Install grub2 package

tazpkg -gi grub2

Mount target and install grub2 inside

mount /dev/sdb1 /mnt

grub-install /dev/sdb --root-directory=/mnt --no-floppy

tazpkg -gi grub2 --root=/mnt

Prepare target for chroot and configure grub2

mount --bind /dev /mnt/dev

mount --bind /proc /mnt/proc

mount --bind /sys /mnt/sys

chroot /mnt

Inside chroot run grub-mkconfig

grub-mkconfig -o /boot/grub/grub.cfg

exit

umount /mnt/dev /mnt/proc /mnt/sys

umount /mnt

sync && reboot

Enjoy

[attachment=52176,3505]

Offline

#3 2024-03-16 12:45:03

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

Thanks. The steps all worked perfectly however when I reboot I got a kernel panic with

unable to mount root fs on unkown block (0,0)

I then formated entire ssd to ext3, installed and got to a grub> prompt and it is so long since I have done this that I have no idea what to enter.

I can start again from scratch no problem. What are recommendations for ssd install on a usb port?

Offline

#4 2024-03-16 13:09:57

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

Is this something to do with booting from a USB port?

If sda is first sata ssd will grub not expext to find an fs on sda rather than sdb when I boot from a usb port?

Offline

#5 2024-03-17 09:30:21

shann
Administrator
Registered: 2011-04-01
Posts: 1,296
Website

Re: Install to usb ssd fails boot error 17 cant mount partition

Hi Orby,

Infact if you have sda as usb key and see ssd as sdb, when remove usb, order changed hmm

that why most distributions use uuid instead sdX name.

Suggest to reinstall it with grub2 and adjust it (don't forget to remove usb key).

For grub2 edit 'entry' with 'e', and change last line root=/dev/sdb1 by root=/dev/sda1.

When boot are done run as root :  [c]grub-mkconfig -o /boot/grub/grub.cfg[/c] to ensure entry updated with right value.

[attachment=52179,3506]

Offline

#6 2024-03-17 16:36:14

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

Sorry I should of been clearer; I have Thinkcentre USFF with

SATA0 = Windblows on SSD [sda]

USB = USB to SATA Adapter with SSD [sdb]

CD DRIVE = SATA1 [sr0?]

I install off CD to sdb and reboot to USB SATA adapter

Grub seems to reference (hd2,0) which I will have to look up but in any case I get 'can't find fs' error

If I edit grub to (hd0,0) it will boot kernel but then panic with can't find fs

Offline

#7 2024-03-17 17:36:39

shann
Administrator
Registered: 2011-04-01
Posts: 1,296
Website

Re: Install to usb ssd fails boot error 17 cant mount partition

hmm if understand we have 3 devices 2 ssd and cdrom on sata.

You said grub (hd0,0) boot kernel, in case you need to use root=/dev/sda1.

linux /boot/vmlinuz root=/dev/sda1

Goal is to have right disk and root match.

below match :

hd0 > root=/dev/sda1

hd1 > root=/dev/sdb1

hd2 > root=/dev/sdc1

Offline

#8 2024-03-17 18:40:57

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Install to usb ssd fails boot error 17 cant mount partition

If I edit grub to (hd0,0) it will boot kernel but then panic with can't find fs

you may need to enter a kernel delay at boot, to be entered in the command line after root=xxx

rootdelay=8

Offline

#9 2024-03-17 19:27:47

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

Eventually switched off sata altogether so only cd and usb stick. Tried mem stick, an ssd on a usb adapter and a spinning disc on a usb adapter.

Had tried rootdelay=5 just prior to getting gibor post smile

Anyway, still no joy. Two pics pre root delay added and post

[attachment=52184,3511] [attachment=52184,3512]

Offline

#10 2024-03-17 19:29:44

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

As an aside the boot cd works fine as does a live usb stick

Offline

#11 2024-03-17 22:33:37

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: Install to usb ssd fails boot error 17 cant mount partition

Hi all,

@Orby, please post your grub.cfg

Offline

#12 2024-03-18 07:34:16

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Install to usb ssd fails boot error 17 cant mount partition

I'm not much of an expert, but rootdelay has an effect unless something on the usb interface is not supported

ehci-pci 0000:00:1a.0: dma_pool_free ehci_qh, f55bb060/fffff060 (bad dma)

How to solve I can't tell you, it seems that the adapter doesn't support dma

https://www.kernel.org/doc/html/latest/driver-api/usb/dma.html

However, wait for more authoritative opinions than mine.

Offline

#13 2024-03-18 08:18:23

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

I actually have two usb -> sata adapters. One is Sandisk usb 3 and the other is from a Toshiba external caddy also usb3 . I have used both with Arch & OpenBSD with no problems.

What if its not the adapter but something to do with the front usb ports controller chipset?

I'll try the back one next and post my grub lines.

Offline

#14 2024-03-18 10:41:51

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: Install to usb ssd fails boot error 17 cant mount partition

Another idea: with all the computers I used with Linux, the kernel always named SSD: [c]nvme0n1[/c]. It could be the same with a SATA Adapter on USB port.

Boot from your CD, connect your SATA Adapter with the SSD, open a terminal, type

[c]fdisk -l[/c]

Maybe you have to replace [c]root=/dev/sdx1[/c] with [c]root=/dev/nvme...[/c]

Offline

#15 2024-03-18 17:57:47

shann
Administrator
Registered: 2011-04-01
Posts: 1,296
Website

Re: Install to usb ssd fails boot error 17 cant mount partition

Hi all,

@ceel good catch could be simply it ?

I check on my mini servers but it's nvme (m.2 port).

In case see as nvme, but when i had stock ssd it's see as sda.

root@amberle:~# mount |grep nvm

/dev/nvme0n1p1 on / type ext4 (rw,relatime)

/dev/nvme0n1p2 on /home type ext4 (rw,relatime)

root@amberle:~# cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-5.10.210-slitaz64 root=/dev/nvme0n1p1 ro

Offline

#16 2024-03-21 14:35:03

Orby
Member
Registered: 2024-03-15
Posts: 8

Re: Install to usb ssd fails boot error 17 cant mount partition

rootdelay=10 fixed this.

Offline

#17 2024-03-22 06:58:30

shann
Administrator
Registered: 2011-04-01
Posts: 1,296
Website

Re: Install to usb ssd fails boot error 17 cant mount partition

Hi Orby,

nice to read this smile.

Great, have fun

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.021 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]