You are not logged in.
I've Googled this all i could, and tried some of the solutions given, like stuff about mkinitcpio, installing a `fallback' kernel or something ... don't even know if i did it all right but anyway, nothing did help.
During bootup from the Arch newly installed on the second partition (ext2) of a USB stick, i get:
::Initramfs Completed - control passing to kinit
IP-Config: no devices to configure
Waiting 0 s before mounting root device...
kinit: Unable to mount root fs on device dev(8,2)
kinit: init not found!
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: kinit Not tainted 2.6.30-ARCH #1
Call Trace:
[<c03cef23>] ? panic+0x5b/0xff
[<c013f834>] ? do_exit+0x614/0x6f0
[<c02dd1f0>] ? redirected_tty_write+0x0/0xe0
[<c013fa20>] ? complete_and_exit+0x0/0x30
[<c0103d94>] ? syscall_call+0x7/0xb
Here is my fstab:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
/dev/fd0 /media/fl auto user,noauto 0 0
/dev/sda2 / ext2 auto 0 0
### The above line was created by me, TaylanUB.
Here's the mtab:
/dev/sda1 / ext3 rw,noatime,relatime,errors=continue,user_xattr,barrier=1,data=ordered 0 0
### In the above, i tried to change it to sda2 and ext2. Didn't work.
/proc /proc proc rw,nosuid,noexec 0 0
sysfs /sys sysfs rw,relatime 0 0
udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
/dev/sda5 /mnt/sda5 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sda2 /mnt/sda2 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdb2 / ext2 rw,relatime,errors=continue 0 0
udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
none /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
And here's my menu.lst:
# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
# /dev/sda3 (hd0,2)
#
# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# for more details and different resolutions see
# http://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
# (0) Arch Linux
title Arch Linux [/boot/vmlinuz26]
root (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sda2 ro
initrd /boot/kernel26.img
# (1) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1
Thanks in advance.
Regards.
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
If there is a hard disk, it will map to /dev/sda. Your USB stick will be at /dev/sdb
Your kernel command line says:
kernel /boot/vmlinuz26 root=/dev/sda2 ro
Try changing that to /dev/sdb2.
You can edit that temporarily in the grub menu to try it before you change the config file.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
When i enter the edit line thingy in GRUB while booting from the USB stick, it appears that the GRUB in the stick sees the stick as sda and the HDD as sdb.
That's also why it uses (hd0,1).
But i shall try it anyway... Could be something i don't understand yet. Actually, yeah, could be that the /kernel/ sees them different than GRUB, eh?
I'll report back.
EDIT
OK, it made a difference.
>>> SECOND EDIT: (Messed this post. LOL) I realized that what i describe below actually also happens when i change the device in the kernel line to something totally off, like sdc2, which doesn't even physically exist. So i think sda2 (what i had originally) was just right. But i might still be wrong.
I got:
Waiting 10 seconds for device /dev/sdb2 ...
Root device '/dev/sdb2' doesn't exist, attempting to create it
ERROR: Failed to parse block device ids for '/dev/sdb2'
ERROR: Unable to detect or create root device '/dev/sdb2'
You are being dropped to a recovery shell
Type 'reboot' to reboot
Type 'exit' to try and continue booting
NOTE: klibc contains no 'ls' binary, use 'echo *' instead
If the device '/dev/sdb2' gets created while you're here,
try adding 'rootdelay=10' or higher to the kernel command line
ramfs $
I HAVE tried to add rootdelay=10, no difference.
Then i typed exit to this `ramfs $' prompt and got again,
Trying to continue (this will most likely fail) ...
::Initramfs Completed - control passing to kinit
IP-Config: no devices to configure
Waiting 0 s before mounting root device...
kinit: Unable to mount root fs on device dev(0,0)
kinit: init not found!
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: kinit Not tainted 2.6.30-ARCH #1
Call Trace:
[<c03cef23>] ? panic+0x5b/0xff
[<c013f834>] ? do_exit+0x614/0x6f0
[<c02dd1f0>] ? redirected_tty_write+0x0/0xe0
[<c013fa20>] ? complete_and_exit+0x0/0x30
[<c0103d94>] ? syscall_call+0x7/0xb
The only difference being the dev(0,0) instead of dev(8,2) now.
Last edited by TaylanUB (2009-09-17 12:55:13)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
Update (sorry for double-posting):
GRUB and all really sees the USB stick as sda (it is installed on it...), but after the kernel loads, it seems to detect my HDD as sda, and also fails to detect the USB stick at all.
I've realized this when i've seen the kernel loading screen or whatever you call it (from where i copied all the above code sections) talk about some 144 GiB Maxtor drive (that's the HDD of the PC), as well as sda1, sda2, sda3 and sda5, which are the partitions of the HDD.
ACTUAL PROBLEM:
1) How do i make it detect the USB stick?
I will try now to have the GRUB on my HDD load root from sdb2. That might work but would not be a real solution as the point of a USB stick with Linux is to use it on non-Linux computers as well...
EDIT: Before doing the above, i've edited GRUB's menu.lst and changed that kernel line to have root=/dev/sdb2. Then using the GRUB on the HDD with root=/dev/sdb2, i came up to a login prompt, so yeah, sdb2 was correct, but the GRUB on the USB stick doesn't detect it. Edited some above parts of my post according to that, see the actual problem please.
Off-topic:
It failed at a few things during boot. And i have no idea what user name and password i'm supposed to use. I guess i just have to configure a root password and then use the user name su or something... Anyway, these are secondary problems which i hopefully will solve myself.
Last edited by TaylanUB (2009-09-17 19:03:38)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
Sorry but... *BUMP*
And i actually came a bit further about the reason of the problem.
To tell it you directly, the kernel doesn't detect the USB stick and create sdb, and i have no idea why or how to fix that.
But you also get a nifty, detailed, problem summary. =P
PROBLEM SUMMARY:
The local PC i use has one HDD. sda1 is ext3 with GRUB and some Linux; sda2 is NTFS with Windows XP; sda5 is NTFS with stored files.
I have a USB stick (let's call it `Flash'). sdb1 is FAT32 with stored files; sdb2 is ext2 with GRUB and Arch.
I CAN boot into Arch via the GRUB on the local HDD, using this menu.lst entry:
root (hd0,0)
kernel /boot/kernel-2.6.25.20-114 root=/dev/sdb2 ro
initrd /boot/initramfs-2.6.25.20-114
I CANNOT boot into Arch via the GRUB on Flash, using this menu.lst entry:
root (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sdb2 ro
initrd /boot/kernel26.img
>>> NOTE: When GRUB on Flash starts, and i enter editing mode for the root line and use TAB completion via "(hd<tab>", it appears to detect Flash as (hd0,x), and the local HDD as (hd1,x). I am absolutely sure about this, as the number of partitions as well as their file systems makes it obvious. So the root line (hd0,1) is a must, not a fault.
>>> THE Problem: Even though, as explained above, GRUB initially detects Flash as (hd0,x) (or sda), the kernel seemingly detects the local HDD as sda, AND FAILS TO DETECT THE USB STICK AT ALL. This became to be obviously true when i listed the contents of /dev, after being dropped to the recovery shell (or entering it manually with the `break' option in the kernel line). There was sda1, sda2 and sda5 (the partitions of the local HDD) and no sdb at all.
(In case you thought of recommending me to, i already HAVE tried using root=/dev/sda2, and it gave a different error (as it successfully detects sda2, but sda2 is the freaking WinXP partition), further proving all of what i said.)
Last edited by TaylanUB (2009-09-18 15:25:10)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
You seem to be doing a good job yourself off of it, so I just have some few comments:
1) when you boot from a usb-stick, as far as grub is concerned - this is (hd0)
2) when the kernel gets loaded from usb, then your harddisk becomes /dev/sda and your usb-stick /dev/sdb, because the kernel uses other means of detecting disks than does grub.
Could you please try the following menu.lst:
default 0
timeout 10
title archlinux on-a-stick
root (hd0,0)
kernel /boot/vmlinuz26 ro root=/dev/sdb2
initrd /boot/kernel26.img
Also - the /etc/fstab (again, on your usb-stick) should have
/dev/sdb2 / ext2 defaults 1 1
... I guess the above is about the only combination you haven't tried ... ;-)
Last edited by perbh (2009-09-18 15:46:14)
Offline
Thanks for the answer, first of all.
Dunno why the fstab in the first post was saying sda2, i seemingly changed it long ago, but whatever.
(hd0,0) was the least thing i'd expect to work, so first i just edited fstab and changed the <option> of /dev/sdb2 to `default' (was `auto' like you see in first post), and changed <dump> and <pass> to 1 and 1.
In short, i made it identical to what you said.
No success with only that.
Then i tried (hd0,0), and as expected, no success; it gave me ``Error 15: File not found'' before even starting to boot anything. So (hd0,0) is really the FAT32 partition (well, that's how it's expected to be) and there's no kernel images there...
It seems, there's a fault in either /boot/vmlinuz26 or /boot/kernel26.img... By the way, i had tried /boot/kernel26-fallback.img as well. So i am assuming it is more likely to be about vmlinuz26.
The fact that i can perfectly (well, there's some [FAIL]ing processes but that is off the current topic) boot into the system with the GRUB in my HDD - which is actually because that one links to another kernel and all - just further proves all this.
Later today (most likely `technically' tomorrow but how relevant is this? =P) i'll try to individually copy the vmlinuz26 and kernel26.img files over to the Linux on my HDD and see how they work. I might as well copy over the kernel and initramfs from the local Linux to the USB and try how that works, too. I hope that'll reveal some things.
Perhaps i really simply have to replace the kernel image or vmlinux... Or both.
Last edited by TaylanUB (2009-09-18 19:13:21)
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
i'd try
title Arch Linux Fallback [/boot/vmlinuz26]
root (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sdb2 ro
initrd /boot/kernel26-fallback.img
just a shot in the dark - maybe booting from the fallback img will help with usb drive detection.
Last edited by schuay (2009-09-18 19:20:55)
Offline
Your attention is well appreciated, but you'll see in the post just above yours, that i already have tried that.
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline
I copied over a kernel file named `kernel-2.6.25.29-114' and an initrd file named `initramfs-2.6.25.20-114' over to Arch's /boot from the /boot of the Linux on my HDD, and using those two, together (and only together), can boot Arch.
Does anyone have an idea why my vmlinuz26 and kernel26.img should not work? I'm clueless on this.
``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
~ Albert Einstein
Offline