You are not logged in.

#1 2012-01-27 18:43:49

leberyo
Member
Registered: 2009-12-30
Posts: 123

[Solved]Plz Help: e2fsck boot error at boot.

So, the update of mkinitcpio broke my system.  I know what the problem is from reading the posts here:
https://bbs.archlinux.org/viewtopic.php?id=134024
http://mailman.archlinux.org/pipermail/ … 24124.html

I was able to boot another distro's (puppy linux) live cd and add the "shutdown" and "fsck" hooks to /etc/mkinitcpio.conf
Now it seems that I need to recreate initramfs after changing mkinitcpio.conf.

I have no idea how to do this.  Anybody have an idea, hopefully in noob language to do this?

Thanks v much.

Last edited by leberyo (2012-01-29 02:47:11)

Offline

#2 2012-01-27 20:36:54

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]Plz Help: e2fsck boot error at boot.

mkinitcpio -p linux

Please consider fixing your partitioning.

Offline

#3 2012-01-27 22:02:19

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

It says:
Building image from preset: 'default'.
...
>Error:  Specified kernel image does not exist: '/boot/vmliuz-linux'
...
...
/usr/bin/mkinitcpio: line 123: cannot create temp file for here-document: Read-only file system.
Error: Specified kernel image does not exist: '/boot/vmlinuz-linux

Any idea?

Offline

#4 2012-01-28 00:30:33

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

I think I screwed my system now@#%@%
Typed mount /boot
then mkinitcpio -p linux

now it won't let me get to command line.

freezes at initrd /kernel26.img

Offline

#5 2012-01-28 01:51:49

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

As I understand, you might need to boot live arch and chroot to your system and sudo mkinitcpio -p linux (as you already changed mkinitcpio.conf)

Offline

#6 2012-01-28 16:32:50

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

Running mkinitcpio -p linux without mounting all the filesystem changed my mtab file.  So I think I need to fix my mtab file first. 

I found an old post of mine with my mtab in it:
#UUID=8C6085FC6085ED70 /mnt/windows  ntfs-3g  defaults,noatime  0 0
/dev/sda2 /boot ext3 defaults 0 1
/dev/sda3 / ext4 defaults,noatime 0 1
/dev/sda5 /tmp ext4 defaults,nosuid,nodev 0 1
/dev/sda6 /var ext4 defaults,nosuid,nodev 0 1
/dev/sda7 /usr ext4 defaults,noatime,rw,nodev 0 1
/dev/sda8 swap swap defaults 0 0
/dev/sda9 /home ext4 defaults,noatime,nosuid,nodev 0 1

So, with my Puppy Linux LiveCd, I'll edit the mtab with these settings.  Then,

mount /dev/sda2 /boot
mount /dev/sda3 /
mount /dev/sda5 /tmp
mount /dev/sda6 /var
mount /dev/sda7 /usr
mount /dev/sda8 swap
mount /dev/sda9 /home

After that, I should be able to reboot and have command prompt again, at which point I run

chroot /mnt

Then

mkinitcpio -p linux

Anything I'm missing???  Really appreciate all the help guys.

Offline

#7 2012-01-28 16:51:18

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]Plz Help: e2fsck boot error at boot.

/etc/mtab is a list of mounted filesystems. You should not be attempting to edit this file. Moreover, it should be a symlink to /proc/self/mounts as of the filesystem 2011.12 package.

Offline

#8 2012-01-28 18:18:56

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

So, skip the mtab modification?
Just mount the partitions and then continue

chroot /mnt
mkinitcpio -p linux

Offline

#9 2012-01-28 18:45:14

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: [Solved]Plz Help: e2fsck boot error at boot.

Follow these instructions to chroot as you need to mount sysfs etc.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#10 2012-01-28 19:39:04

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

chroot includes 4 steps (three mounts before chroot) and you have to mount everything as your original system had.
make executable script of this for chrooting

sudo mount -t proc proc $1/proc
sudo mount -t sysfs sys $1/sys
sudo mount -o bind /dev $1/dev
sudo chroot $1 /bin/bash

example filename "mychroot"
then if you put it in the path
you can anywhere use
mychroot /mnt

But before that, mount everything like it is in your os

And miniticpio whould work withou editing mtab. (I never touched mtab in my life..)
(This is safest way. but there are faster ones..)

Offline

#11 2012-01-28 22:31:45

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

I was able to mount my previous partitions and chrooted.
I did mount /dev/sda3 /mnt
mount /dev/sda2/ /mnt/boot
mount /dev/sda7 /mnt/usr
chroot /mnt

Now do I just do

Mkinitcpio -k /boot/your-kernel -c /etc/mkinitcpio.conf  -g /boot/your-initramfs-image

Can you please give me an example of this?  Do I have to know what kernel version and inert it in "your-kernel"?

or do I just

mkinitcpio -p ???

Thx I'm almost there...

Offline

#12 2012-01-28 22:36:14

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

In my case it works by

sudo mkinitcpio -p linux

Offline

#13 2012-01-28 22:42:43

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

mkinitcpio -p linux
>
bash: mkinitcpio: command not found

Offline

#14 2012-01-28 22:55:10

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

I guess in needs

sudo pacman -S mkinitcpio --noconfirm

Offline

#15 2012-01-28 23:09:49

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

akumixx wrote:

I guess in needs

sudo pacman -S mkinitcpio --noconfirm

Tried that as well:

bash: sudo: command not found

took out sudo.

bash: pacman: command not found

Offline

#16 2012-01-28 23:12:45

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

Chroot by this

sudo chroot /dir /bin/bash

or use myscript to get binds
script is up here

edit:::!
I forgot to change the dir.
I think yours is /mnt

Last edited by akumixx (2012-01-28 23:16:12)

Offline

#17 2012-01-28 23:14:54

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

Do you mean:

sudo chroot /mnt /bin/bash   ???

Offline

#18 2012-01-28 23:16:54

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

yes

Offline

#19 2012-01-28 23:19:03

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

Still the same.

sudo > command not found
mkinicpio > command not found
??

Offline

#20 2012-01-28 23:26:10

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

Use the three mounts

edit:::
It is also possible to run chroot this way

d='/mnt';sudo mount -t proc proc $d/proc;sudo mount -t sysfs sys $d/sys;sudo mount -o bind /dev $d/dev;sudo chroot $1 /bin/bash

as a one command

Last edited by akumixx (2012-01-28 23:29:28)

Offline

#21 2012-01-28 23:26:52

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

akumixx wrote:

Use the three mounts

I don't really know what you mean or how to do that...

Offline

#22 2012-01-28 23:30:27

akumixx
Member
Registered: 2011-05-03
Posts: 59

Re: [Solved]Plz Help: e2fsck boot error at boot.

now you can see my edited post, use the line as a one command

Offline

#23 2012-01-29 02:48:03

leberyo
Member
Registered: 2009-12-30
Posts: 123

Re: [Solved]Plz Help: e2fsck boot error at boot.

Fixed.  Thank you all for the help.

/Usr was actually /dev/sda9, causing the problems.  It seems that it changed from my initial installation.

Offline

Board footer

Powered by FluxBB