How to "pass init = bootarg" ?

Asked by Subhranshu Dwivedi

Hi,

I am compratively new to ubuntu,
i have installed Ubuntu 7.10 with dual boot with MS vista, then upgraded to Ubuntu 8.04 and then to Ubuntu 8.10.

i have no idea what actually happened when i tried changing the visula effects. My system freezed.
i waited for quite a long time no joy.
i did a power cycle.

after this i was unable to pass the booting process which gives:-

Loading please wait...
mknod: File exists
19+0 records in
19+0 records out

kinit: name_to_dev_t (/dev/disk/by-uuid/84effa58-ee21-420d-9c45-233a552636af) = dev(8,2)
kinit: trying to resume from /dev/disk/by-uuid/84effa58-ee21-420d-9c45-233a552636af)
kinit: no resume imgae, doing normal boot....
mount: mounting /dev/disk/bu-uuid/ac67818a-4afa-4a75-b78a-b53758624b2b on /root failed:invalid argument
mount: mounting /root/dev on /dev/.static/dev failed: no such file or directory
mount: mounting /sys on root/sys failed: no such file or directory
Taget file system doesn't have /sbin/init
no init found, Try passing init=bootarg

Busybox v1.10.2 (ubuntu 1:1.10.2-1 ubuntu7) built in shell (ash) Enter 'help' for a list of built in commands

(initramfs)

i just dont have any idea where to head with......

Please suggest....

Regards,

Subhranshu Dwivedi.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Subhranshu Dwivedi
Solved:
Last query:
Last reply:
Revision history for this message
Matthew Lye (matthew.lye) said :
#1

basically for one reason or another, grub can no longer find the OS to boot to.

You need to boot off the live CD and mount the local disk. Then compare the grub menu, fstab, and fdisk -l and we can get an idea of what to do.

Revision history for this message
Subhranshu Dwivedi (subhranshu) said :
#2

thanx vantrax
i booted with my ubuntu 7.10 livecd
and mounted the local disk

got the issue resolved..............

many thanks again
u r gem....

Revision history for this message
Dana Jokela (djokela) said :
#3

"basically for one reason or another, grub can no longer find the OS to boot to.

You need to boot off the live CD and mount the local disk. Then compare the grub menu, fstab, and fdisk -l and we can get an idea of what to do."

I'm having a similar problem with the BusyBox / initramfs prompt, though I got this after upgrading from 8.10 to 9.04.

I imagine your instructions will work for me, but I don't know how to mount the local disk, or how to compare the grub menu, fstab, and fdisk -l. I don't even really know what that means...

Any chance you can explain that a bit more, Matthew Lye?

Revision history for this message
Matthew Lye (matthew.lye) said :
#4

If it is the same problem you need to work a few things out.

Boot from the Live CD.

Run sudo fdisk -l The output will be will be a list of your partitions which you need to identify your root partition (usually this is sda1)

You need to mount that partition to access the files:
sudo mkdir /media/root
sudo mount /dev/sda1 /media/root

Browse to /media/root/boot/grub and look at menu.lst and make sure that references the correct sda# value.
Browse to /media/root/etc/ and look at fstab and see if the values are correct (you can also replace the uuid values with the sda# values in the comments),

If that doesnt work you need to run update-grub from inside your disk so with the drive mounted as above:
sudo chroot /media/root/
sudo update-grub

If you have any problems please head to the IRC support channel or file a question in launchpad.

Revision history for this message
LeDucDuBleuet (eleduc) said :
#5

@Matthew Lye Thank you very much, you saved our lives here!
Your solution worked like a charm!
Thanks again!
:-D

Revision history for this message
Kevin Mason (kjm-uk) said :
#6

Hi

I have virtually the same question as Subhranshu above. However I'm using Mint 6, I have a few different errors (see below) and I can't change and save any of the above named files once booted from cd. Any help please?

Starting up ...
Loading please wait...
19+0 records in
19+0 records out
kinit: name_to_dev_t (/dev/disk/by-uuid/d56a067b-3727-4355-aad1-5bd) = dev(8,22)
kinit: trying to resume from /dev/disk/by-uuid/d56a067b-3727-4355-aad1-5bd)
kinit: no resume imgae, doing normal boot....
mount: mounting /root/dev on /dev/.static/dev failed: no such file or directory
mount: mounting /sys on root/sys failed: no such file or directory
mount: mounting /proc on /root/proc failed: no such file or directory
Taget file system doesn't have /sbin/init
no init found, Try passing init=bootarg

Busybox v1.10.2 (ubuntu 1:1.10.2-1 ubuntu6) built in shell (ash)
Enter 'help' for a list of built in commands

(initramfs)

Revision history for this message
OTHman (amir963ma) said :
#7

I'm having the same problem under 9.10

Revision history for this message
lesfrancoeurs (lesfrancoeurs) said :
#8

THanks Matthew Lye. I had the same problem and I did what you said
 "you need to run update-grub from inside your disk so with the drive mounted as above:
sudo chroot /media/root/
sudo update-grub"
and it worked! Thank you.

Revision history for this message
bala (balajibeckham) said :
#9

Matthew Lye, i'm running Ubuntu 10.04 and i have the same problem. however, i'm unable to mount my disk, so i can't perform any of the above fixes. can you suggest anything to help?

Revision history for this message
delance (olivier-delance) said :
#10

@bala
Boot on Ubuntu CD with option "Try" and launch System->Administration->Gparted, and check your disk is visible
@Kevin Mason
Are you sure you try to update file into /media/root/boot/grub ?

Revision history for this message
bala (balajibeckham) said :
#11

disk is now mounted, but im still getting errors.

"ubuntu@ubuntu:~$ sudo chroot /media/root/
root@ubuntu:/# sudo update-grub
sudo: unable to resolve host ubuntu
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted) "

any ideas?

Revision history for this message
delance (olivier-delance) said :
#12

@bala
On Ubuntu CD, can you:
1) Open Firefox and connect to Launchpad
2) In a terminal (Applications->Accessories->Terminal), type the following command:
          sudo parted -l
3) Paste result in Launchpad
4) Do process as explained in
       https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
and paste all commands and results (and error message) to Launchpad

Revision history for this message
Matthew Piatkowski (progone) said :
#13

@delance I am also having the same issue as bala; w/lucid. I will also put the results in https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

Revision history for this message
Matthew Piatkowski (progone) said :
#14

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA ST3500630A (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 430GB 430GB primary ntfs boot
 2 430GB 449GB 18.5GB primary ext3

Model: ATA ST3500630A (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 300GB 300GB primary ext4
 2 300GB 304GB 4294MB primary linux-swap(v1)
 3 304GB 500GB 196GB extended
 5 304GB 314GB 9999MB logical ext2
 6 314GB 500GB 186GB logical ext4

Model: ATA ST3500320AS (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 430GB 430GB primary ntfs
 2 430GB 500GB 70.3GB primary ext3

Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0
has been opened read-only.

Revision history for this message
Matthew Piatkowski (progone) said :
#15

@bala @delance GRUB solution didn't fix my issue.

However, I went into System --> Administration --> Disk Utility
and noticed I had bad sectors on the partition were my /boot is located.

I typed: fsck /dev/sdb1
and answered 'yes' to all the questions.

The result:
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
Server: recovering journal
Error reading block 59304551 (Attempt to read block from filesystem resulted in short read). Ignore error<y>? yes

Force rewrite<y>? yes

Clearing orphaned inode 1720124 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720122 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720120 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720116 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720114 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720112 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1720111 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1573615 (uid=0, gid=0, mode=0100644, size=17394060)
Clearing orphaned inode 3284578 (uid=0, gid=0, mode=0100644, size=132920)
Clearing orphaned inode 3284575 (uid=0, gid=0, mode=0100755, size=40155992)
Clearing orphaned inode 3284569 (uid=0, gid=0, mode=0100644, size=1454767)
Clearing orphaned inode 4459325 (uid=1000, gid=1000, mode=0100660, size=5)
Clearing orphaned inode 137495 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 134902 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 132621 (uid=1000, gid=1000, mode=0100600, size=0)
Clearing orphaned inode 1709325 (uid=0, gid=0, mode=040000, size=4096)
Clearing orphaned inode 131356 (uid=102, gid=105, mode=0100600, size=0)
Clearing orphaned inode 131351 (uid=102, gid=105, mode=0100600, size=0)
Clearing orphaned inode 131244 (uid=102, gid=105, mode=0100600, size=0)
Clearing orphaned inode 131201 (uid=102, gid=105, mode=0100600, size=0)
Clearing orphaned inode 131188 (uid=102, gid=105, mode=0100600, size=0)
Server: clean, 682554/18317312 files, 27389754/73242335 blocks

Wish my luck, I will now reboot and hopefully this has fixed the problem.

Revision history for this message
Matthew Piatkowski (progone) said :
#16

good news!

fsck /dev/sdb1

 fixed my issue.

Revision history for this message
Sam_ (and-sam) said :
#17

Just for the record, in specific regarding
> Disk /dev/sda: 500GB
Bug #569900
Bug #605720

Revision history for this message
Matthew Piatkowski (progone) said :
#18

Its been a few weeks since I fixed the issue. It all broke down again. I tried my steps again. It didn't work, but since my boot (grub) partition is on sdb1, all I needed to do was change the boot order of my HDD in cmos. The slave drive is actually the master boot right now.

Revision history for this message
Matthew Piatkowski (progone) said :
#19

Its been a few weeks since I fixed the issue. It all broke down again. I tried my steps again. It didn't work, but since my boot (grub) partition is on sdb1, all I needed to do was change the boot order of my HDD in cmos. The slave drive is actually the master boot right now.

Revision history for this message
Ross McDowall (r-mcd) said :
#20

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009dba1

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 29273 235129856 83 Linux
/dev/sda2 29273 30402 9066497 5 Extended
/dev/sda5 29273 30402 9066496 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo mkdir /media/root
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /media/root
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

ubuntu@ubuntu:~$

This has happened before, I don't remember how I fixed it though.

Through the Live CD and entering /media/root/ there is nothing.

ubuntu@ubuntu:~$ sudo chroot /media/root
chroot: cannot run command `/bin/bash': No such file or directory

Attempting "fsck /dev/sdb1".

ubuntu@ubuntu:~$ fsck /dev/sdb1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
fsck.ext2: No such file or directory while trying to open /dev/sdb1

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

ubuntu@ubuntu:~$

The partition appears in Gparted.

ubuntu@ubuntu:~$ sudo mount /dev/sda1
mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab

Help?

Revision history for this message
Ross McDowall (r-mcd) said :
#21

http://ubuntuforums.org/showthread.php?t=1386549

Repeating the fsck command fixed it.