You are not logged in.

#1 2010-05-31 02:48:41

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

This has to be my all time biggest screw up to date since using Linux!

WHY:
I've had one of my Ubuntu installs hacked and patched to support  Nvidia GT220 HDMI audio out months ago, but thought I'd just wait for nvidia, alsa and/or the Linux kernel for support in the future for my Arch install. Well today, I read that the new 2.6.34 kernel has built in support for it....WooHoo!!
I thought I just had to enable the testing repo and upgrade the kernel. etc...

HOW:

So I temporarily enabled testing, and using my handy GTKPacman,  upgraded to 2.6.34, or so I thought.
Upon rebooting, I discovered that I was still running 2.6.32, so next I install all the 2.6.34 stuff and delete all the 2.6.33 stuff.

Reboot error to kernel is now MISSING!    Oh S%$T, now what!

HOW I Restored It:

After a quick attempt to use a Ubuntu kernel copied to Arch on the same computer and failure.....

I googled arch kernel restore. with my other computer, which leads me to http://wiki.archlinux.org/index.php/Ker … all_kernel

As always when I screw something up, Arch WIKI to the rescue!!! Boot into my Arch live CD.

Next problem, I don't remember what partition numbers are boot and root, so boot back to Ubuntu, get partition info, back to live CD.
Now I get chrooted into my Arch install, but don't know the exact kernel file details....back to ........

So I finally get all the info to restore Arch via the chroot live CD method.

I'm thinking that I should have known, and should have just navigated the file system for the info I needed via chroot live CD, but it didn't sink in till it was all over. Chroot/live CD = installed Arch file system.

I also know that Arch is directed more towards "experienced" Linux users, and they know all this, but....

Would it benefit anyone other than me, for the above mentioned  WIKI,  to remind or hint, along with instructions, at getting the required info via as part of the live CD kernel restore process??

Just a thought....

Last edited by jeff story (2010-05-31 21:10:03)


Check out my website for info on the Arch Linux Installer

Offline

#2 2010-05-31 03:05:40

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

Forgot to mention this one.

I now have a /bootbackup directory with all the necessary stuff to make this easy next time. I created the bootbackup under root as my boot partition was too small to back up everything inside it.

Last edited by jeff story (2010-05-31 03:46:39)


Check out my website for info on the Arch Linux Installer

Offline

#3 2010-05-31 03:25:58

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

Congrats?  Anyways, sometimes its funner to break things. big_smile


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#4 2010-05-31 06:11:07

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

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

Change the wiki by all means, if you feel the information is useful.

Odd that you are preparing for "next time" - do you really expect that you will do this again? smile

Offline

#5 2010-05-31 06:24:08

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

tomk wrote:

Odd that you are preparing for "next time" - do you really expect that you will do this again? smile

That's what she said.

Offline

#6 2010-05-31 09:09:01

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

Oh, snap.


no place like /home
github

Offline

#7 2010-05-31 21:08:46

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

OK,

I added the following to the WIKI. http://wiki.archlinux.org/index.php/Ker … all_kernel

First you need to get the kernel details.

# cd /var/cache/pacman/pkg
# find kernel*

Now use the kernel details in the command below.

I would like some constructive critique on the command.
It showed me what I needed on my real system, but will it work within live CD / chroot environment?

[root@Arch2009p2 jeff]# cd /var/cache/pacman/pkg
[root@Arch2009p2 pkg]# find kernel*
kernel26-2.6.33.4-1-x86_64.pkg.tar.xz
kernel26-docs-2.6.34-1-x86_64.pkg.tar.xz
kernel26-firmware-2.6.33.4-1-x86_64.pkg.tar.xz
kernel26-headers-2.6.33.4-1-x86_64.pkg.tar.xz
kernel26-manpages-2.6.34-1-x86_64.pkg.tar.xz

Using the * was just a guess on my part that seemed to work.

If anyone can edit the WIKI with no over-site or review by "experts", it really surprises me that they are and remain useful.
Example, I know just enough Linux and command line to be dangerous and I can contribute to the WIKI !!

Also would anyone care to take a shot at why I wasn't able to upgrade to the testing repo kernel?
What I tried seems pretty simple and straight forward.
I have searched unsuccessfully for an answer.


Check out my website for info on the Arch Linux Installer

Offline

#8 2010-05-31 21:20:46

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

tomk wrote:

Odd that you are preparing for "next time" - do you really expect that you will do this again? smile

Very good chance as I still want to upgrade to the testing kernel.  I'm too impatient and stubborn to just wait till it's in the base repo!!

Actually, the BFL  method has taught me way more about Linux than just using it, so I will continue to break, fix, and learn!!! Haha


Check out my website for info on the Arch Linux Installer

Offline

#9 2010-05-31 22:21:27

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

Figured out the kernel upgrade issue I had.

GTK pacman did not indicate any problems but the command line did.

[root@Arch2009p2 jeff]# pacman -S testing/kernel26
resolving dependencies...
looking for inter-conflicts...
error: failed to prepare transaction (could not satisfy dependencies)
:: nvidia: requires kernel26<2.6.34

So I

[root@Arch2009p2 jeff]# pacman -S testing/nvidia
resolving dependencies...
looking for inter-conflicts...

Targets (4): kernel26-firmware-2.6.34-1  kernel26-2.6.34-1  nvidia-utils-195.36.24-2  nvidia-195.36.24-2  

Total Download Size:    35.52 MB
Total Installed Size:   172.96 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from testing...
 kernel26-firmware-2...   804.9K  151.2K/s 00:00:05 [################################################################] 100%
 kernel26-2.6.34-1-x...    22.8M  139.4K/s 00:02:47 [################################################################] 100%
 nvidia-utils-195.36...     9.8M  130.0K/s 00:01:17 [################################################################] 100%
 nvidia-195.36.24-2-...     2.1M  106.4K/s 00:00:21 [################################################################] 100%
checking package integrity...
(4/4) checking for file conflicts                   [################################################################] 100%
(1/4) upgrading kernel26-firmware                   [################################################################] 100%
(2/4) upgrading kernel26                            [################################################################] 100%
>>> Updating module dependencies. Please wait ...
>>> MKINITCPIO SETUP
>>> ----------------
>>> If you use LVM2, Encrypted root or software RAID,
>>> Ensure you enable support in /etc/mkinitcpio.conf .
>>> More information about mkinitcpio setup can be found here:
>>> http://wiki.archlinux.org/index.php/Mkinitcpio

>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
==> Building image "default"
==> Running command: /sbin/mkinitcpio -k 2.6.34-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
WARNING: All config files need .conf: /etc/modprobe.d/framebuffer_blacklist.pacsave, it will be ignored in a future release.
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26.img'...SUCCESS
==> SUCCESS
==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.34-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [pata]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26-fallback.img'...SUCCESS
==> SUCCESS
(3/4) upgrading nvidia-utils                        [################################################################] 100%
(4/4) upgrading nvidia                              [################################################################] 100%
ERROR: Module nvidia is in use
In order to use the new nvidia module, exit Xserver and unload it manually.

Upon reboot I get

[jeff@Arch2009p2 ~]$ uname -a
Linux Arch2009p2 2.6.34-ARCH #1 SMP PREEMPT Mon May 17 09:29:00 CEST 2010 x86_64 AMD Phenom(tm) 9850 Quad-Core Processor AuthenticAMD GNU/Linux

Now going to test HDMI audio output.

And it works great!!!

Last edited by jeff story (2010-06-01 02:08:37)


Check out my website for info on the Arch Linux Installer

Offline

#10 2010-06-01 00:35:13

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

I am extremely paranoid about this. It has happened to me too.

#!/bin/sh
cp -r /boot /home/brad/backup/may31
cp -r /boot /boot/backup/may31

You know, just in case I delete my whole /boot directory tongue

Crap, I forgot how to write a shebang there yikes

Last edited by cesura (2010-06-01 00:35:56)

Offline

#11 2010-06-01 06:13:43

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

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

So can we assume you have now implemented the real solution to your problem i.e.

pacman -R gtkpacman

Offline

#12 2010-06-01 08:27:48

jeff story
Member
Registered: 2009-05-31
Posts: 237
Website

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

tomk wrote:

So can we assume you have now implemented the real solution to your problem i.e.

pacman -R gtkpacman

Hmmm,

OK, how bout a little story for an analogy.......

After my friends (my) divorce he (I) gave up drinking alcohol for about 6 months or so. Not because of the divorce, but because he (I) blamed it for causing him (me) a lot of legal and personal problems..... It really wasn't the alcohol, it was the guy (me) drinking way too much of it for the wrong reasons, to get shit faced every time he (I) drank.

So after a spell of no drinking, a bit of personal Introspection and personal growth, he (I) realized that if he (I) just drink beer in moderation, not to get shit faced drunk each time but to actually enjoy it, he (I) can now drink and not get into trouble.

So think of GTK pacman as something to enjoy, like beer, but only in moderation... Not too much or for important stuff.  Same as alcohol...

Seriously, I really like a graphical package manager if for on other reason than the ease of looking at the list of different categories of packages. It just seems to be a  much more "warm and fuzzy" way of looking at the packages, even if for only looking.

Would be just as easy to manipulate packages with pacman in the terminal. I find myself always opening the terminal available in GTK pacman to watch whats going on anyway.

So I'll probably keep it for now......but use in moderation.


Check out my website for info on the Arch Linux Installer

Offline

#13 2010-06-01 08:47:30

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

Re: I Deleted My Kernel.... Why, How, And How I Restored It [SOLVED]

warm and fuzzy.... and misleading. smile

Anyway, your choice.

Offline

Board footer

Powered by FluxBB