LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel Panic after moving partitions (https://www.linuxquestions.org/questions/linux-general-1/kernel-panic-after-moving-partitions-479258/)

GoldenPenguin 08-31-2006 06:27 PM

Kernel Panic after moving partitions
 
I just made the following changes to my system:
Shrank Root FS
deleted swap
made extended partition
created new swap in extended partition
copied root to extended

(so at the moment, I have 2 identical root partitions, though one is larger)

/boot is ext2 and root is reiser.

I changed /boot/grub/menu.lst... I updated the "root=" part to reflect the new partitions... I have an entry for the old root partition and one for the new root partition.

Problem is, when I try to boot either of them, I get a kernel panic. here's the error:

...
savedefault
boot
Uncompressing Linux... Ok, booting the kernel.
[17179575.888000] Kernel panic - not syncing: I/0 error reading memory image
[17179575.888000]


...and that's all I get . I went into /etc/fstab and updated the swap and root locations there too. I don't know what else to do. It seems like it should work, but it doesn't.

Does anyone have any clue what's going on?

Thank you so much for your help.





EDIT: I disabled quiet, and here's the relevant part:

Begin: Running /scripts/local-premount ...
[17179575.548000] Attempting manual resume
[17179575.548000] attempt to access beyond end of device
[17179575.548000] hda3: rw=16, want=8, limit=2
[17179575.548000] Kernel panic - not syncing: I/O error reading memory image


hda3 used to be my swap partition, but now it's an extended partition.

What the heck....

w3bd3vil 08-31-2006 07:34 PM

have you set the filesystem right for swap, it should not be ext3

kilgoretrout 08-31-2006 07:36 PM

You have to edit /etc/fstab to coincide with your new partition layout. In particular, check the entry in fstab for your swap and root partitions. A livecd like knoppix or kannotix comes in handy for these types of problems.

GoldenPenguin 08-31-2006 08:20 PM

Yes, the fs-type for swap is "linux-swap". I have the gparted liveCD open in front of me on my laptop (the broken computer )


I've got:

/dev/hda5 none swap sw 0 0
/dev/hda4 / reiserfs defaults,noatime,data=writeback 0 1
(ommitting irrelevant info of course)
probably important to not that hda3 is not mentioned in either fstab or menu.lst, although logical partitions contained in it are (new root (hda6) and swap (hda5))

...both of which are the correct locations.
(in my other (new) copy, switch out hda4 for hda6 and it's identical)

So... that seems like it should work, no?

Here's my grub menu.lst item:

title Ubuntu 2.6.15-26-k7
root (hd0,1)
kernel /vmlinuz-2.6.15-26-k7 root=/dev/hda4 ro elevator=cfq
initrd /initrd.img-2.6.15-26-k7
savedefault
boot

...and then the same thing again except with hda6

I plan to delete hda4, but not until I can get at least *one* of these booting.

GoldenPenguin 08-31-2006 08:29 PM

Here's fdisk's output:

Code:

Disk /dev/hda: 100.0GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot Start  End    Blocks Id  System
/dev/hda1 *    8287 12161  31125937+  7  HPFS/NTFS
/dev/hda2        1    17    136521  83  Linux   
/dev/hda3      1109  8286  57657285  5  Extended
/dev/hda4      280  1108  6658942+ 83  Linux
/dev/hda5      1109  1369  2096451  82  Linux Swap / Solaris
/dev/hda6      1370  8286  55560771  83  Linux

(please forgive any typos, I haven't bothered with networking, so I just typed all this ;) )

homey 08-31-2006 08:52 PM

Quote:

root (hd0,1)
kernel /vmlinuz-2.6.15-26-k7 root=/dev/hda4 ro elevator=cfq
On any Linux system I have, both references to root are the same. Keep in mind that grub speak would make that
root (hd0,3)

GoldenPenguin 08-31-2006 09:01 PM

hm, ok. I'll try that. But I think the root(hdn,n) means the boot partition. I'll try though.

Nope, it just says file not found. My boot partition is hda2, or (hd0,1). This worked before, too, so it should now

GoldenPenguin 08-31-2006 09:03 PM

ok, I found a thread in German that may help: http://translate.google.com/translat...-US:unofficial

relevant part:
Quote:

Did you change the size of the Partion?
My assumption:
- Size changed (smaller…)
- “Signature” indicates old size
- “confused…”

Attempt times of the Rettungsystem “mkswap /dev/hd <deine swappartitionsbezeichnung>

Otherwise I would activate times a “MEMORY test of that boat CD.

Haveaniceday
I tried mkswap, and it didn't make a difference, but could it be a similar problem for my extended partition somehow?

GoldenPenguin 08-31-2006 09:21 PM

Okay, forget everything I've said. I dug up my initrd and unzipped it.

I ran "strings | grep hda3" and it turned up: "RESUME=/dev/hda3".
...so... how do I change this? I guess I could just mount it, change that to hda5, then rezip and replace, right?


I'll give it a shot , it's not like I can screw it up more.

GoldenPenguin 08-31-2006 09:53 PM

I GOT IT!

I gunzipped all my initrds, opened them in a hex editor, replaced hda3 with hda5, and recompressed. It boots!

Thanks for your help guys, I wouldn't have figured it out on my own.

Burke


All times are GMT -5. The time now is 11:28 AM.