LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices


Reply
  Search this Thread
Old 06-11-2006, 10:16 AM   #16
cwhite71
LQ Newbie
 
Registered: Jun 2006
Posts: 1

Rep: Reputation: 0
kernel panic - not syncing:Attempted to kill init


Quote:
Originally Posted by bricox
I'm having the same problem as described here. I tried about everything I can think of. I was previously running FC2 before upgrading to FC5. Does anyone have any other suggestions?

After trying the above my error changes slightly. It becomes "no fstab.sys, mounting defaults". Then I receive the kernel panic.

Thanks,
Brian
I had the same issue and resolved it by doing a clean installation of FC5 instead of upgrading from FC2. It only took about 20 minutes (as opposed to 2+ hours for the upgrade). Luckily I had defined my home directory on a different partition from root (/dev/hda4 vs /dev/hda1) so I was able to retain my FC2 user data.

During the install I chose the option to install using custom partition layouts. I had to edit the existing partions so that /dev/hda1 was set to / and dev/hda2 for swap, and /dev/hda4 as /home. I think this was the inderlying problem so you might try this first using qtpartd. Also, I went ahead and reformatted /dev/hda1 since I was already there and really wanted a clean installation.
 
Old 09-19-2006, 09:29 AM   #17
ckeith100
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
Post In booting with multiple hard drives

Updates on what I had posted. It turns out getting the source for nash.c and finding out what the commands were actually doing was the best solution in the end. The original comments have been left for historical purposes so anyone reading it who has made the same mistakes can correct them.

Firstly my suggestion to use:

echo Creating root device
mkrootdev -t ext3 -o defaults,ro /dev/hda1

Is wrong. This isn't a normal mount command so the switch needs to be --ro not ",ro". Additionally the device is specified without /dev (at least it is in a preinstalled nash script). Additionally this commend in the nash.c code helped clarify this issue further:

/* if we get here, we got root from the kernel command line,
so we don't _really_ care that there wasn't one on the
mkrootdev command line. */

In otherwords if you pass a "root=" parameter on the kernel command line, then it will use that. So you can hack you init nash script as much as you like, but it won't fix anything. You need to fix your kernel boot parameters. Thus I ended up with:

initrd "init" script:

echo Creating root device
mkrootdev -t ext3 -o defaults,ro hda1

kernel cmd line params:

root=/dev/hda1

In my case I *had* to use /dev/hda1 because I have two drives with partitions labelled LABEL=/. When I go back to a single drive then I'll change this to use:

root=LABEL=/

Further the attempt to replace the "mount /sysroot" command with a more standard "mount" command specifying the device was incorrect because nash uses /sysroot in the mkrootdev command, so you're going to have to use it. Therefore I ended up with the default mount command, and not the version I gave below:

mount /sysroot


After that it was a matter of fixing up my /etc/fstab to use /dev/hdaX rather than labels since I still have the two disks in the machine. That will be changed back when there is only one disk in the box.

If you're reading this and wondering how this affects you - well sorry I can't help except to explain what I did and why. This appears to mostly affect people who did a fresh install and FC decided to setup their drive(s) using LVM. In that case I suspect you'll encounter the same problem, except that the root= value needs to be set for your LVM configuration. Sorry I can't help further, but this fixed things for me so I thought I'd document it since I hadn't found this answer written down anywhere. Too many people just seem to reinstall which I can't do as its a production server.

Colin.


---- Incorrect assumptions follow for historical purposes:


Hi,

Using FC5 installed from scratch, trying to migrate from old SCSI to new IDE.

Thanks to the previous posters I was able to make changes to my init
script.

First I got rid of that stupid

"Trying to resume from <device>
No suspend signature on swap, not resuming."

message by removing the "resume". I'm trying to move from an old SCSI
disk to a shiny new IDE drive so when mkinitrd was built (via rescue
disk and chroot'ing, which I think causes most of the problems) using
the command:

mkinitrd --preload=xfs --omit-scsi-modules \
/boot/initrd-2.6.17-1.2127_FC5.img 2.6.17-1.2157_FC5

It mostly worked. It did however find the swap on /dev/sda3 and so entered
a line:

resume LABEL=SWAP-sda3

which caused lots of uneeded warnings. You can change this to

resume /dev/hda3

or whatever device is appropriate for your swap, but if you're not going to do any resume'ing, why bother? I just removed it.

Next was the root device problems, messages like:

Creating root device.
mkrootdev: expected fs options
Mounting root filesystem.
mount: missing mount point
Setting up other filesystems.
Setting up new root fs

I found that this was because of the labels on the disks. As I'm moving from one drive to another everything was using labels, but the partitions on both drives are labelled as / for /dev/Xda1 /var for /dev/Xda2, and /usr for /dev/Xda5. I'm not sure, but this seemed to be part of the problem because I changed the devices to be hard coded to /dev/hda1 on a couple of the lines and it worked:

Originally:

echo Creating root device
mkrootdev -t ext3 -o defaults,ro LABEL=/
echo Mounting root filesystem.
mount /sysroot

Became:

echo Creating root device
mkrootdev -t ext3 -o defaults,ro /dev/hda1
echo Mounting root filesystem.
mount -o defaults,ro -t ext3 /dev/hda1

This fixed the root problem. Now I'm up to, and stuck on, the error message:

setuproot: moving /dev failed: No such file or directory
no fstab.sys mounting internal defaults

While this isn't a complete solution, I thought I'd post it in case anyone Googling for this problem ended up here (as I did) as this gets the puzzle solved a little more.

Colin.

Last edited by ckeith100; 09-19-2006 at 10:26 AM.
 
Old 03-28-2009, 12:55 PM   #18
dick.swift
LQ Newbie
 
Registered: Oct 2005
Location: Decatur, GA
Distribution: Xubuntu 11.10, Fedora 16
Posts: 15

Rep: Reputation: 0
Thumbs up Thanks - these steps resolved same issue upgrading FC7 to FC10

Quote:
Originally Posted by masterxi View Post
After almost giving up on Fedora 5, I finally got the fix to this problem.

The error that causes all the trouble is "mount: could not find filesystem '/dev/root'". Appartently, in the init script within initrd-2.6.15-1.2054_FC5.img, the command 'mount /sysroot' is trying to mount /dev/root to /sysroot. Fedora 5 does not use /dev/root like in the previous versions of Fedora. Instead, it uses '/dev/VolGroup00/LogVol00' or '/dev/hda1' (or whereever '/' is located) to mount to /sysroot. For some reason, when init calls 'mount /sysroot', it's trying to mount /dev/root to /sysroot, instead of /dev/VolGroup00/LogVol00 to /sysroot. This messes up everything after this step in the init process. When it does a switchroot at the end, it fails. After killing init, it causes the kernel panic.

Here's the fix:

1) Boot with the rescue CD
2) Type 'chroot /mnt/sysimage' (wherever it mounts the Fedora 5 partition)
3) 'cd /boot'
4) 'mkdir newinit'
5) 'cd newinit'
6) 'gunzip -c ../initrd-2.6.15-1.2054_FC5.img | cpio -idmv'
7) 'vi init'
8) Find 'mount /sysroot' (near the end of the file)
9) Delete or comment this out
10) Replace with 'mount -o defaults --ro -t ext3 /dev/VolGroup00/LogVol00 /sysroot' where /dev/VolGroup00/LogVol00 is the mount point for /
11) ':wq' out of vi
12) 'find . | cpio --quiet -c -o >../newinitrd'
13) 'cd ..' - you are now in /boot
14) 'mv initrd-2.6.15-1.2054_FC5.img initrd-2.6.15-1.2054_FC5.bak' - backup current initrd img file (just in case)
15) 'gzip -9 < newinitrd > initrd-2.6.15-1.2054_FC5.img'
16) Reboot the computer without the CD

* Steps 4-6,12,13,15 were taken from another site, but I couldn't post the URL. I'll try in my next post.

This should fix it. I'm glad I can finally run Fedora 5 on my box.

MarkCole, I'm not sure if you were experiencing the exact same problems I was with mounting root. However, I hope this helps anyone else experiencing the same problems I had.

Andy
Thanks - these steps also helped me resolve same error with upgrade of FC7 to FC10. just substitute the current initrd-* file in /boot

cheers
 
Old 09-19-2009, 08:45 AM   #19
antus
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Rep: Reputation: 0
Wow, thanks for this post. I landed here on a google search trying to fix a related but different problem, and this gave me the clues and background info to figure it out.

My server is CentOS 5.3, and was running on a nvidia chipset motherboard. The mother board decided to 'let out the smoke' yesterday and that was the end of that. The system was a few years old, so finding a replacement board would be hard and updating the system looked like a good idea. I purchased an asus PK5PL-AM EPU motherboard and core 2 E6300 with hardware virtualisation (mmmmm xen with a windows 98 virtual machine (low memory requirements - 64mb? with pci passthrough to use the windows drivers for my cheap multi chip pci capture card that I could not get to work in linux?). I installed the gear in the case, and booted of the centos DVD in rescue mode. It could mount the hard drives (software raid), and I could see the HDDs had survived and my data was intact. Then I tried to boot natively off the array and the problems began.

I had updated the system to a vanilla kernel 2.6.27 and used mkinitrd to create the initrd on the old system. It had included nv_sata and sil_sata for the old board, and not included ata_piix as it was not required at the time. I compared the modules rescue mode was loading, and used the instructions here to unpack my initrd and see what it was loading. The fix turned out to be as simple as copying ata_piix in to the initrd and hacking the init script to load it!

Trying to do it with official tools failed me, as due to the custom kernel I could not chroot in to the mounted system as the modules for the rescue kernel were not present. Because I could not chroot or link in the modules dir to /modules/ (the rescue envronment is read only) I could not use mkinitrd to build it automatically.

I had limited space on my /boot/ so optimised the write command in to the one liner:

find . | cpio --quiet -c -o | gzip -9 > ../initrd-2.6.27.22.img

I hope this rambling has put enough key words here for the next person with a similar problem to find it

Last edited by antus; 09-19-2009 at 08:50 AM.
 
  


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
Flash Install Problem (FC5) filterfann Fedora 4 09-30-2006 07:20 AM
FC5 does not install bootloader TigerLinux Fedora - Installation 2 04-01-2006 06:41 AM
How to install YUM for FC5 FireGunz Fedora 6 03-28-2006 08:20 AM
System hangs during FC5 install sidebuster Linux - Newbie 3 03-27-2006 02:13 PM
Boot failure after upgrading FC5 TR3 to FC5 Official Release fsb1284 Fedora 3 03-25-2006 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation

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