LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   migrated from ext3-disk to a ext4 disk - now linux wont boot (http://www.linuxquestions.org/questions/linux-newbie-8/migrated-from-ext3-disk-to-a-ext4-disk-now-linux-wont-boot-786936/)

zilogZ80 02-04-2010 06:44 AM

migrated from ext3-disk to a ext4 disk - now linux wont boot
 
OS: Debian unstable 32bit, kernel 2.6.32-2, grub 1.98 from late january 2010 (only have working net-access from work now, so I am grabbing information from memory).

EXT3 and EXT4 support is compiled into the kernel along with chipset/scsi/sata support (not as modules), and I have tested to boot ext3 with it before proceeding.

Prereq: my old disk started to have too much S.M.A.R.T errors, so I bought another one, put in a USB cabinet, added swap and ext4 partition/filesystem to it, and copied over all data from the old system to the new that was mounted at /dest using the command "find ./ -xdev -print0 | cpio -paV0 /dest".

Swiched disks, so I now have the ext4 disk sitting at /dev/sda (partitions: sda1 => ext4, sda2 => swap), and booted into rescue-mode from cdrom, using /dev/sda1 as root with a shell on.

After doing this, I performed the following commands:
mount --bind /dev /dest/dev
chroot /dest

modified the /etc/default/grub to instruct the kernel to boot using ext4, ran grub-install --recheck /dev/sda
ran update-grub to modify /boot/grub/grub.cfg (which looks as it should)

After doing this, grub finds my partition and mounts it. It however stalls with the message: "warning: unable to open an initial console" and does nothing after this point.

I have no ramdisk, but my old kernel booted fine from ext3 (and still does if I copy it to a ext3 partition), and since the ext4 support is compiled into the kernel - should I really need a ramdisk?

Anyone have a clue about what could be wrong?

tredegar 02-04-2010 10:26 AM

Quote:

Anyone have a clue about what could be wrong?
Only grub2 has support for ext4, so you'll need to get a copy of that, and use grub2 from now on. I doesn't matter that you have ext4 compiled into your kernel - grub cannot load the kernel from the ext4 partition.

You could boot from a 'buntu 9.10 CD which comes with grub2 and use the live CD to install grub2 to your HDD using the command line in a root terminal.

Here's a tutorial for grub2. I suggest you read it before you start as grub2 is very different from "grub legacy".

zilogZ80 02-04-2010 10:34 AM

Quote:

Originally Posted by tredegar (Post 3852531)
Only grub2 has support for ext4, so you'll need to get a copy of that, and use grub2 from now on. I doesn't matter that you have ext4 compiled into your kernel - grub cannot load the kernel from the ext4 partition.

You could boot from a 'buntu 9.10 CD which comes with grub2 and use the live CD to install grub2 to your HDD using the command line in a root terminal.

Here's a tutorial for grub2. I suggest you read it before you start as grub2 is very different from "grub legacy".

I have grub2 installed (the version number is 1.98, grub1 latest is 0.97 methinks). I am using a very up-to-date debian disk to do the rescuing, which is practical as it both contains grub2 and ext4 support.

tredegar 02-04-2010 10:49 AM

You have grub2 - sorry for not noticing that.

So, if you boot your kernel (and do you mean just the kernel, or the root filesystem as well?) from an ext3 partition, it works, but if you boot the kernel from an ext4 partition, it fails?

What does your grub.cfg look like?

zilogZ80 02-05-2010 03:19 AM

Quote:

Originally Posted by tredegar (Post 3852577)
You have grub2 - sorry for not noticing that.

So, if you boot your kernel (and do you mean just the kernel, or the root filesystem as well?) from an ext3 partition, it works, but if you boot the kernel from an ext4 partition, it fails?

What does your grub.cfg look like?

Well.. as I tried to take another copy of the old disk, it went up into smoke.. so now I am in no need of moving data anymore (disk is so full of broken sectors now that I hardly can copy anything from it) ;)

Btw, I suspect this is the reason that my migration method failed - the old disk contained too much broken data, and that caused "sh", "init" or similar to stop working.

New install, heere I come :/


All times are GMT -5. The time now is 01:34 PM.