[SOLVED] kernel panic not syncing no init found try passing init option to kernel
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
kernel panic not syncing no init found try passing init option to kernel
Hi
I built an LFS and I installed a GUI on it. this LFS has been built on a VM machine, so I want to transfer it to new partition on my hard. I copy LFS's files to my hard and I make it bootable then I install grub on it and I Edit my /etc/fstab and /boot/grub/grub.cfg files. now when I select LFS from grub menu I receive below error message:
Code:
scsi 1:0:0:0 Attached scsi generic sg1 type 5
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices
md: autorun ...
md: ... autorun DONE
VFS: mounted root(vfat filesystem) readoly on device 8:1
devtmpfs: error mounting -2
Freeing unused kernel memory: 560k freed
Write protecting the kernel text: 7480k
Write protecting the kernel read-only data: 2348k
Kernel panic - not syncing: No init found. Try passing init=option to kernel. see Linux Documentation/init.txt for guidance.
I have searched but I don't know why this error occurs!
I have not familiar with kernel configuration as well.
AND I have a question: why in the above log I see red part?!
my partition is Ext3 type.
if you need any info from my LFS for better guidance, tell me.
thank you
It is not an easy work as merely copying between VM and ext3 partition as can be inferred from your boot error report.
A matter of personal solution to simplify the work:
1. Download, burn and boot from a rescue disk, here is Gparted with gui.
2. Being booted from rescue liveCD you will need to "chroot" into the LFS partition which you have prepared. I assume you know how to do this already being an LFS builder yourself. If not then ask further.
3. Being chrooted now at LFS partition, from there run
Code:
~# grub-mkconfig -o /boot/grub/grub.cfg
~# grub-install /dev/sda (Note: verify first what is your hard drive's name, is it sda? and only use sda in that case, no partition [1,2...] number.)
Reboot.
You might need compile an initrd.img if booting raises a problem on file system.
Hope that helps.
Good luck.
Last edited by malekmustaq; 01-02-2013 at 09:25 AM.
1. Download, burn and boot from a rescue disk, here is Gparted with gui.
2. Being booted from rescue liveCD you will need to "chroot" into the LFS partition which you have prepared. I assume you know how to do this already being an LFS builder yourself. If not then ask further.
3. Being chrooted now at LFS partition, from there run
Code:
~# grub-mkconfig -o /boot/grub/grub.cfg
~# grub-install /dev/sda (Note: verify first what is your hard drive's name, is it sda? and only use sda in that case, no partition [1,2...] number.)
Reboot.
I did according to what you say above and after it I received above error. I first used a live cd and parted my hard to one partition and make it ext3 type with "mke2fs -jv /dev/sda1" command. then I mount my hard to live cd and transfer LFS to it(extract my backup of LFS to hard).then I mounted virtual filesystem according to LFS book and chrooted to my LFS ,then with "grub-install /dev/sda" commmand I installed grub on it and Edited my fstab and grub.cfg files then by disk utility app make it bootable(enable bootable flag). then reboot and grub menu is appear on screen and I select my just os, LFS , and then above error eccurs.
please tell me your predicts.
what is the cause of this problem in your opinion?! :-?
How I copy lfs to different machines is I dd the drive it,s on then dd to new drive.
I dont know if you can do this from vm though never used vm. If it dosn't boot it throughs me into grub prompt which I can recover from.
Hi spicky0011
can you tell me how you copy lfs to different machines by using dd command explicitly?
I am not familiar with this command and I have not any suggestion about how to use it!!!
your experience about transfer from one machine to another one maybe helpful for me
thank you
at this point I have an LFS that X Window System and Fluxbox and Firefox is installed on it.
I built my LFS on a VM machine. I have installed grub on lfs and I could boot up with LFS as a stand alone os.
then I boot with my host machine and mount my LFS to my host.
now I want to transfer my LFS to a hard drive.
for this, I think about below steps:
1st: make partition.image.bz2 file with using of dd command:
dd if=/dev/sdb1 of=/partition.image bs=4096 conv=notrunc,noerror
cd /
bzip2 partition.image
2nd: with winSCP I copy my image file to my flash memory.
3th: I boot up with a liveCD linux( I have fedora 13)and I mount my hard to it.
then cp my image file to my hard and then I restore it with these commands:
bunzip partition.image.bz2
dd if=partition.image of=/dev/sda1 bs=4096 conv=notrunc,noerror
first please tell me this steps are true?
then I have another question
Is lfs the only OS on the drive or is it dual boot
yes, lfs is the only OS on the drive.
but I have a question about dd command.
can I create image from a partition that just the files have copied to image file?
now I have a 10G partition that lfs is built on it, while 1.4G of it is used. when I run "dd if=/dev/sdb1 of=/partition.image bs=4096 conv=notrunc,noerror" command, whole of my partition is converted to image file and the size of image file is about 10G!
what do I do ?
I want to create a image file that have same size as used space on the partition. how do I it?
I used gparted and shrink my 10G partition to 2G.
according to #7 post, transferring of LFS has same problem as post#1 .
this error(post #1)occur both post #2 steps and post #7 steps.
this means that my transferred files is correct and my hard is bootable.
what do you think?
is it related to my kernel config? what is the meaning of this kernel panic?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Quote:
Originally Posted by k84834
...can I create image from a partition that just the files have copied to image file?
now I have a 10G partition that lfs is built on it, while 1.4G of it is used. when I run "dd if=/dev/sdb1 of=/partition.image bs=4096 conv=notrunc,noerror" command, whole of my partition is converted to image file and the size of image file is about 10G!
what do I do ?
I want to create a image file that have same size as used space on the partition. how do I it?
This is what dd does it creates a one-one img of the source if you just want the files try cd'ing into the root of the (mounted) partion you want to save and try
Code:
tar -cvzf /path/to/store/archive .
And then to restore the files on a clean empty partion ( again mounted ) cd into it and use
Code:
tar -xvf /path/to/store/archive
Alternatively you can use the /dump/restore programs which is what I use for backing up and restoring partions.
We know that the lfs works did you reinstall grub to /dev/sda, I would create new grub.cfg and fstab files copy fstab and grub.cfg to fstab-old grub.cfg-old.
I dont know what that kernel panic is Did you format drive to ext3 or 4 what ever you used to build
Hi again
for your reply up to this time thank you.
I go to grub menu and run below command:
ls (hd0,1) /
and my lfs root files was showed.
I change my grub config from "root=/dev/sda1" to "root=/dev/hda1" and my system booted but not complete. it is encounter with an FAILURE error that say the super block is wrong.
I predict maybe grub must be installed on /dev/hda ! but when I go to my live linux and mount my lfs and chroot to it, there is not hda device in /dev directory!
my hard is PATA but I dont know why in my live linux that lfs is mounted to it, there is no hda device and my hard is known as sda for live linux.
my grub on lfs is Grub-1.99 and live's Grub is 0.97
please guide me.
thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.