You are not logged in.

#1 2008-02-28 13:56:25

stevesutt89
Member
From: Newcastle Australia
Registered: 2007-10-30
Posts: 46
Website

cpio -i < initrd.img killed arch (and debian)

This afternoon i decided to try and (primatively) hack the arch linux installer initrd.img file from the Arch Linux 2007.08.1 install CD.  I tried to extract the contents of the file (following these instructions :http://www.ducea.com/2006/06/24/inspect … itrd-file/) by first putting a .gz extension on it, extracting it with gunzip and then extratcing the produced file with cpio.  This did not work (was outputting messages like "File no written: same or newer version on file system").  So then i did the stupidest thing in the world, Twice.  I ran that same command (cpio -i < initrd.img --make-directories) as root on arch linux and then on debian (casue it still would not work).  What has resulted is i think that desite the fact that i had cd'd to a different folder, the cpio command with root powers has tried to extract everything in the initrd.img file into the root of my filesystem.  Bad.

Now when I reboot, the bootup scripts cannot load modules (ie modprobe fails saying it cannot find modules).  GDM will not load.  Pretty Much everything is broken (i am writing this post from a live CD).  Interesting over things: I recall something (xserver i think) complaining that it could not write to the /tmp folder.  Also i now get the same message that displays when you load up the install cd when i boot into arch on my hdd (says stuff like to install arch type arch/install....and press enter to enter the bash shell...)

To try and fix the problem, I tried doing the same thing with the file kernel26.img from the /boot folder on arch linux in the same way that i extracted the initrd.img file from the install cd, but to no avail. 

As i said earlier i think that the cpio command only wrote extra files into my filesystem (ie all the ones that existed in  the initrd.img archive from the arch linux install cd that were not already on my filesystem) Becasue it was outputting messages like "File not written: same or newer file on filesystem" i don't think i overwrote any already existing files. 

Any Ideas as to how i might get stuff the way it was before?

Last edited by stevesutt89 (2008-02-28 13:59:53)

Offline

#2 2008-03-01 00:13:27

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: cpio -i < initrd.img killed arch (and debian)

Woah.... if you unpacked the INSTALLER image, you have a lot of shit on your disk now that... well, that's borked. I don't know all of the cruft that is crammed into the install ISO, but it even has things like 'naim' on it....

If you want your system to boot, I'd recommend booting a live cd, chrooting into your drive, then running "pacman -Sy mkinitcpio kernel26" to at least get a bootable kernel... however, I'd seriously recommend reinstalling...

Offline

#3 2008-03-01 00:51:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: cpio -i < initrd.img killed arch (and debian)

After a similarly unwise move with a regular initrd image, I rectified the situation by using the initrd's file list and pacman -Qo to identify packages that needed reinstalling. I deleted any initrd files that weren't owned by anything. That worked out fine. However, it's a way bigger job with the installer image - up to you to decide if that approach or a reinstall is easier.

Offline

Board footer

Powered by FluxBB