LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-04-2010, 07:44 AM   #1
zilogZ80
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
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?
 
Old 02-04-2010, 11:26 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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".
 
Old 02-04-2010, 11:34 AM   #3
zilogZ80
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
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.
 
Old 02-04-2010, 11:49 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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?
 
Old 02-05-2010, 04:19 AM   #5
zilogZ80
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
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 :/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick question involving ext4/ext3 and dual boot Ssurno Linux - General 1 06-11-2009 02:38 PM
Boot disk wont load dellthinker Linux - Software 1 01-19-2007 03:34 PM
dd disk to disk but wont boot Linux_Kidd Linux - General 8 01-03-2007 10:02 AM
disk wont boot ben_h_24 Linux - Newbie 2 09-20-2005 05:33 PM
Red Hat 9.0 Wont Boot Lost Boot Disk! AndrewBalmos Linux - Newbie 8 01-05-2004 08:06 PM


All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration