LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-09-2019, 06:26 AM   #1
NickF_93
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Rep: Reputation: Disabled
Unhappy Kernel panic after installation via tar and chroot


Hello everyone, I'm trying to install a slackware system on a PC with a live usb of Ubuntu 18.04.

PC has 2 disk: SDD and a Flash memory.
At boot Ubuntu see SDD as /dev/sda, Flash as /dev/sdc and Live USB as /dev/sdb.
I'm trying to install system on /dev/sdc (Flash memory).

So I formatted /dev/sdc1 to ext4 and mounted on /mnt
Code:
# mount /dev/sdc1 /mnt
and then extracted compressed system in /mnt

Code:
# tar -xvpzf /dir/with/tar/MySystem.tar.gz -C /mnt
Then I mounted proc, dev, sys:
Code:
# mount -t proc /proc /mnt/proc
# mount -o bind /dev /mnt/dev
# mount -o bind /sys /mnt/sys
Then I created lilo.conf in /etc with:

boot = /dev/disk/by-id/<FLASH-DISK-ID>

and

root = /dev/disk/by-uuid/<FLASH-DISK-PART1-FS-UUID>

I set right UUID in /etc/fstab:
/dev/disk/by-uuid/<FLASH-DISK-PART1-FS-UUID> / ext4 defaults 1 1

and then run mkinitrd:
Code:
# mkinitrd -c -k4.19.45 -f ext4 -r /dev/disk/by-uuid/<FLASH-DISK-PART1-FS-UUID> -u -o /boot/initrd.gz
it give me errors like:

tempnam: No such file or directory
cat: bin: Is a directory
...
rm: cannot remove 'bin': Is a directory
...

but at the end it say:

/boot/initrd.gz created

then I run

Code:
# lilo
At reboot if live USB is inserted the system boot without problems, if I remove live USB it give me the Kernel Panic error:

kernel panic not syncing vfs unable to mount root fs on unknown block

What's the problem?

Thanks in advance.

Last edited by NickF_93; 08-09-2019 at 07:53 AM.
 
Old 08-09-2019, 07:47 AM   #2
kgha
Senior Member
 
Registered: May 2018
Location: Sweden
Distribution: Slackware 64 -current multilib from AlienBob's LiveSlak MATE
Posts: 1,070

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
You write that Ubuntu sees both your Flash and your USB as dev/sdc ?
Can't understand how this can occur, but my tuppence is that it has created some confusion so that your boot setup is dependent on one thing or another that resides on your USB stick.
 
Old 08-09-2019, 07:54 AM   #3
NickF_93
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kgha View Post
You write that Ubuntu sees both your Flash and your USB as dev/sdc ?
Can't understand how this can occur, but my tuppence is that it has created some confusion so that your boot setup is dependent on one thing or another that resides on your USB stick.
Sorry, I correct my question:
SSD: sda
USB: sdb
FLASH: sdc

I want to install on sdc1 the system and my live system is on USB (sdb1)
 
Old 08-09-2019, 08:03 AM   #4
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Can you post your fstab and lilo.conf?
 
Old 08-09-2019, 08:23 AM   #5
kgha
Senior Member
 
Registered: May 2018
Location: Sweden
Distribution: Slackware 64 -current multilib from AlienBob's LiveSlak MATE
Posts: 1,070

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Another tuppence:
This might be dependent on your BIOS, but I've experienced (with an old Asus eee) that USB sticks always take precedence over Flash (SD) cards.
With the flash in its slot (and no USB stick attached), it was recognised as sdb. If I booted from a USB, the stick was sdb and flash became sdc.
So my guess is that with the USB removed, there is no sdc.
As Lysander666 writes' you should check fstab and lilo and see what they contain.
 
Old 08-09-2019, 08:50 AM   #6
NickF_93
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Lysander666 View Post
Can you post your fstab and lilo.conf?
fstab:
Code:
/dev/disk/by-uuid/3d847b09-cd7b-4758-8d72-c40519c96f33        /                ext4        defaults         1   1
#/dev/sdb1        /                ext4        defaults,remount,ro,noload         1   1
#/dev/sdb2        /mnt/part2       ext4        defaults                           1   1
#/dev/sda1        /mnt/data        ext4        defaults                            0   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
#/dev/fd0         /mnt/floppy      auto        noauto,owner                       0   0
devpts           /dev/pts         devpts      gid=5,mode=620                      0   0
proc             /proc            proc        defaults                            0   0
tmpfs            /dev/shm         tmpfs       nosuid,nodev,noexec                 0   0
lilo.conf:

Code:
append=" vt.default_utf8=1 acpi=on pcie_aspm=off mitigations=off oops=panic idle=poll nohalt"
boot = /dev/disk/by-id/ata-CFast_3ME4_YCA11905060340088

#compact        # faster, but won't work on all systems.

  bitmap = /boot/slack.bmp
  bmp-colors = 255,0,255,0,255,0
  bmp-table = 60,6,1,16
  bmp-timer = 65,27,0,255

prompt
timeout = 100
change-rules
  reset
vga = normal

image = /boot/vmlinuz-4.19.45
  root = /dev/disk/by-uuid/3d847b09-cd7b-4758-8d72-c40519c96f33
  append = "4 vt.default_utf8=1 ipv6.disable=1 TOOLS=0  acpi=noirq pcie_aspm=off ramdisk_size=512000 usbcore.usbfs_memory_mb=256 mitigations=off oops=panic idle=poll nohalt quiet"
  label = Linux
  read-only  # Partitions should be mounted read-only for checking

image = /boot/vmlinuz-4.19.45
  root = /dev/disk/by-uuid/3d847b09-cd7b-4758-8d72-c40519c96f33
  append = "4 vt.default_utf8=1 ipv6.disable=1 TOOLS=1  acpi=on pcie_aspm=off ramdisk_size=512000"
  label = Tools
  read-only
image = /boot/vmlinuz-4.19.45
  root = /dev/disk/by-uuid/3d847b09-cd7b-4758-8d72-c40519c96f33
  append = "3 vt.default_utf8=1 ipv6.disable=1 acpi=on pcie_aspm=off ramdisk_size=512000"
  label = Console
 
Old 08-09-2019, 08:51 AM   #7
NickF_93
LQ Newbie
 
Registered: Mar 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kgha View Post
Another tuppence:
This might be dependent on your BIOS, but I've experienced (with an old Asus eee) that USB sticks always take precedence over Flash (SD) cards.
With the flash in its slot (and no USB stick attached), it was recognised as sdb. If I booted from a USB, the stick was sdb and flash became sdc.
So my guess is that with the USB removed, there is no sdc.
As Lysander666 writes' you should check fstab and lilo and see what they contain.
Ok, but I would be device name independent and refers to devices by their ids and uuids
 
Old 08-09-2019, 09:07 AM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Not sure it's the issue but the kernel per se doesn't know the file system UUIDs, so to find / you need to rely on an initrd that will run udev. I don't see "initrd=...' lines in your lilo.conf.
 
Old 08-09-2019, 09:11 AM   #9
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by Didier Spaier View Post
Not sure it's the issue but the kernel per se doesn't know the file system UUIDs, so to find / you need to rely on an initrd that will run udev. I don't see "initrd=...' lines in your lilo.conf.
You may be onto something. As far as I remember persistent naming prefers a generic kernel if using UUIDs.
 
  


Reply

Tags
chroot, kernel panic, linux, slackware, ubuntu



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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Kernel Panic (/usr/sbin/chroot) after chrooting some users. Niels@debian Linux - General 0 08-12-2004 05:22 PM
How do I un tar a .tar, .tar.z, .tar.gz file vofkid Linux - Newbie 4 03-15-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:41 PM.

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