LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-01-2022, 09:03 AM   #1
RanjitRobin
LQ Newbie
 
Registered: Feb 2022
Posts: 6

Rep: Reputation: 0
Root filesystem created from tar doesn't boot


I've created a bootable Linux system by following LFS 11.0
The boot device itself is on USB, so I have used initrd as well.
All worked fine. Then I've created a backup of the root filesystem from the host using the command
Code:
tar -cJpf $HOME/i9-11.0.tar.xz -C $LFS
Then I formatted the USB disk, installed the root filesystem from the backup in a host using the command
Code:
tar -xpf $HOME/i9-11.0.tar.xz -C $LFS
I installed grub on the USB disk and updated grub.cfg from the backup copy.

When I rebooted with the USB stick, grub loads the kernel, but the kernel could find the root filesystem. It gives the error in the picture error.jpg. Sorry for the pictures as I couldn't find these errors in any of the logs.

However, when entering the 'exit' command in the initial shell, it continues to load the root filesystem correctly, which is shown in post_error.jpg

I did a sanity check on the extracted filesystem, everything seems to be there.

Is anything specific in the root filesystem that should be installed rather than extracted from tar ball?
Attached Thumbnails
Click image for larger version

Name:	error.JPG
Views:	26
Size:	222.9 KB
ID:	38695   Click image for larger version

Name:	post_error.JPG
Views:	21
Size:	168.1 KB
ID:	38696  
 
Old 04-01-2022, 11:15 AM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Maybe adding rootdelay=15 to the linux line of the grub menuentry.
 
1 members found this post helpful.
Old 04-01-2022, 11:21 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
It may be slow to recognise the usb stick. Usually when you boot from usb, you add a rootdelay option to the kernel command line to allow for that.

Colorpurple anticipated me!
 
1 members found this post helpful.
Old 04-01-2022, 12:16 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,348

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Another thought, does /etc/fstab entry for / uuid correct
 
Old 04-01-2022, 12:37 PM   #5
RanjitRobin
LQ Newbie
 
Registered: Feb 2022
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
Another thought, does /etc/fstab entry for / uuid correct
I use /dev/sdx style in fstab.

But adding rootdelay solves the problem. Thanks for your help.

I am just curious, as to why it wasn't a problem when I build the rootfs initially on USB stick but needed rootdelay only when I created rootfs from backup.

I tested this theory three times. Whenever I've mounted USB stick partition and installed packages directly to the partition, it didn't require rootdelay.
But when I've installed the rootfs by untarring the packages to the mounted USB stick partition, it requires rootdelay.
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
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 > Linux From Scratch

All times are GMT -5. The time now is 01:28 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