LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubutnu won't boot. Error: Target file system doesn't have /sbin/init. No init found. (https://www.linuxquestions.org/questions/linux-newbie-8/ubutnu-wont-boot-error-target-file-system-doesnt-have-sbin-init-no-init-found-877987/)

Zeljka_Lin 04-30-2011 05:57 AM

Ubutnu won't boot. Error: Target file system doesn't have /sbin/init. No init found.
 
When started my computer ubuntu wouldn't start. It gave me this errors:

mount: mounting /dev/disk/by-uuid/***************************** on /root
failed: Invalid argument
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /dev on /root/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
Target file system doesn't have /sbin/init
No init found. Try passing init= bootarg

I found forums describing how to fix this, and I tried to apply this fix: http://pinoy-computing-tips.blogspot...nit-found.html
It helped the first time. But after several boots it crashed again and it keeps crashing.

I have dual boot, Win7 and Ubuntu 10.04 Lucid Lynx.
I'm quite new to Ubuntu so please be clear in your explanations.
I would like to know why this has happened and how to fix this...
Thx in advance.

markush 04-30-2011 08:49 AM

Hello Zeljka Lin, welcome to LQ,

it seems you didn't install the bootloader grub properly or your /etc/fstab is messed up. I'd recommend to boot the installation-CD and try to repair the system.

Using fdisk (like described in your link) is a good idea. You may post the output of fdisk -l.

Markus

Zeljka_Lin 05-01-2011 02:20 PM

Thx for your quick reply. This is output from fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 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: 0x4bc1f926

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 108801 873839622+ 7 HPFS/NTFS
/dev/sda3 108802 121602 102817793 5 Extended
/dev/sda5 108802 121076 98593792 83 Linux
/dev/sda6 121076 121602 4222976 82 Linux swap / Solaris

So I booted from LiveCD and run the command: sudo fsck /dev/sda5/
The problem is that now I have error (something like this) error. grub rescue>
and I can't load Windows or Ubuntu
So I've booted again from LiveCD and run the fsck again but, now it's running it for two days, and still not finished
I have very important data on my Ubuntu. Should I interrupt it??
I would like to know why this happened because I've never had any problems with Ubuntu, everything was working fine.

markush 05-01-2011 02:26 PM

Obviously your Linux-rootpartition is /dev/sda5. Does you grub have a /boot/grub/menu.lst file? if yes, you should look at it and check that there is the correct partition for Linux configured.

If you want to make a backup of your important data, boot with the install-CD, mount /dev/sda5 and copy the files to an USB-storage or external HD.

Markus

Zeljka_Lin 05-02-2011 03:03 AM

Ok, this morning fsck still not finished. I have tried to find /boot/grub/menu.lst but there isn't one (or I can't find it), than I've tried: sudo mount /dev/sda5
but I have this error:
mount: can't find /dev/sda5 in /etc/fstab or /etc/mtab
It seems I'll have to try booting the Win7 and reinstall Ubuntu.. without my data.
I would really like to know WHY this happened, because I don't want this to happen again. There are months of my work on my Ubuntu.
Since I've installed Ubuntu I don't use Win at all, so I don't think windows could delete my grub (I read on the forums It happens? ; I wasn't updating or upgrading my system when it happened so I really don't understand?
Any explanations are welcome...
markush thank you for your time and help...

markush 05-02-2011 03:20 AM

maybe you'll check your /etc/fstab file.

I don't think that fsck will help you. The problem is not the filesystem but that (probably) your /etc/fstab is damaged. I'd recommend to boot with a Live-CD/install-CD and post the /etc/fstab (of the system, not the one of the CD, i.e. mount /dev/sda5 and open /etc/fstab).

Markus

TobiSGD 05-02-2011 04:11 AM

At first, before trying anything to repair the system backup your data. You can do that easily with a live-CD. Just mount your /-partition with
Code:

sudo mount /dev/sda5 /mnt
You will now find the partition under the /mnt-directory. Backup your files now to an external medium. A tip for the future: Always have a backup of your important data. It may also help (but can't replace a backup)to separate your data from your OS, using a separate /home-partition.

That you find no menu.lst-file is normal, newer Ubuntu versions use Grub2 that uses a grub.cfg file for configuration.
After making the backup, test your harddisk with the manufacturer's diagnosis tool. In my eyes your symptoms are pointing to a dying harddisk.

Fred Caro 05-02-2011 04:46 AM

data
 
One way to get the data off that has worked for me (albeit on a disk with only one partition) is to remove the hard drive and put it in a USB caddy. Attach the caddy to another computer and navigate to your home directory, compress it and copy it to another place (USB stick, hard drive). I have not done this with a Linux system so others might know the pitfalls better. Another possibility (to rescue the data) might be to boot up a Knoppix disk and use 'ddrescue' to transfer either the whole of /dev/sda5 or the home directory to another storage device but be careful or you might send it into oblivion.

Ferd.

Zeljka_Lin 05-02-2011 06:42 AM

I cant mount
I've tried:sudo mount /dev/sda5 /mnt
but I have this error:
mount: Stale NFS file handle
I don't know what that means..

Zeljka_Lin 05-02-2011 06:56 AM

I'm not sure if this informations helps:

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD /boot/grub/core.img

sda2: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

sda3: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: ext4
Boot sector type: Unknown
Boot sector info:
Mounting failed:
mount: Stale NFS file handle

sda6: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 1,747,886,092 1,747,679,245 7 HPFS/NTFS
/dev/sda3 1,747,888,126 1,953,523,711 205,635,586 5 Extended
/dev/sda5 1,747,888,128 1,945,075,711 197,187,584 83 Linux
/dev/sda6 1,945,077,760 1,953,523,711 8,445,952 82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 AC0E23480E230B42 ntfs System Reserved
/dev/sda2 508229B58229A088 ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda5 3ddd7b95-cf53-4166-a76d-c3b4e5d82e6a ext4
/dev/sda6 e40e57cd-e8ad-49db-a5d4-bf108e741f6b swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


=================== sda1: Location of files loaded by Grub: ===================


??GB: boot/grub/core.img
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda5

00000000 a4 81 00 00 1d 01 00 00 db 73 b9 4d dc 73 b9 4d |.........s.M.s.M|
00000010 56 fc a6 4d 00 00 00 00 00 00 01 00 08 00 00 00 |V..M............|
00000020 00 00 08 00 01 00 00 00 0a f3 01 00 04 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 01 00 00 00 bf 84 40 01 |..............@.|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000060 00 00 00 00 c1 1e 63 e7 00 00 00 00 00 00 00 00 |......c.........|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080 1c 00 00 00 ac d1 c9 cb 00 00 00 00 a0 4b 09 9f |.............K..|
00000090 db 73 b9 4d 9c 77 e5 9e 00 00 00 00 00 00 00 00 |.s.M.w..........|
000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 a4 81 00 00 5b 05 00 00 e5 f6 b6 4d e1 f6 b6 4d |....[......M...M|
00000110 84 81 c2 48 00 00 00 00 00 00 01 00 08 00 00 00 |...H............|
00000120 00 00 08 00 01 00 00 00 0a f3 01 00 04 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 01 00 00 00 b4 84 40 01 |..............@.|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000160 00 00 00 00 87 9b bd 37 00 00 00 00 00 00 00 00 |.......7........|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000180 1c 00 00 00 90 b7 04 3f 00 00 00 00 18 f8 02 cf |.......?........|
00000190 e0 f6 b6 4d 88 70 2e 79 00 00 00 00 00 00 00 00 |...M.p.y........|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200

I found some script on the net, and the results doesn't look good? Right? Even to me.....


All times are GMT -5. The time now is 02:13 AM.