GRUB Loading stage1.5. Internal error: the second sector of Stage 2 is unknown.

Asked by Johnny Lau

Hello Ubuntu Community,

I need help with my first Ubuntu 9.04 Installation (newbies). I received an error message when booting up as follow:

---------------------------------------
GRUB Loading stage1.5.

GRUB loading, please wait...
internal error: the second sector of Stage 2 is unknown

--------------------------------------

The installation is on IBM Thinkpad T41 1Gb Memory, 40GB HDD and existing Windows XP installed.

Partitions Status
/dev/sda
/dev/sda1 NTFS Size: 21474Mb Used: 0Mb
/dev/sda2 fat32 Size: 4675Mb Used: 3690Mb
/dev/sda5 NTFS Size: 8388Mb Used: 0Mb
/dev/sda6 ext3 Size: 5165Mb Used: 0Mb
/dev/sda7 swap Size: 296Mb Used: 0Mb

During Installation at Partitioning....

I also received this Error Message:
------------------------
ERROR!!!
Error informing the kernel about modifications to partition /dev/sda5 -- Device or resource busy.
This means linux won't know about any changes you made until you reboot --
so you shouldn't mount it or use it any way before rebooting
-----------------------

But this message go away by clicking the Cancel button and installation proceed as normal and finished.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Did you MD5 check your ISO you downloaded? Did you verify the CD once burned?

If you boot to LiveCD you can check the disk is healthy as well as verify the RAM is healthy.

Revision history for this message
Johnny Lau (johnnylau133) said :
#2

Hello,

The Live CD was sent directly from UBUNTU (Original Ubuntu) when I put my order online. It is not downloaded from Internet. I still can load it from the CD and connect to Internet. I have also tried to follow the document "RecoveringUbuntuAfterInstallingWindows" but when the boot up still not working with GRUB error message displayed.

What I don't understand is why during installation, the error message is pointing to /dev/sda5 as well. Even though I can continue and finished the installation. I am not sure whether that is the root cause of this issue.

Revision history for this message
Johnny Lau (johnnylau133) said :
#3

Just a note to add, I can load the Live CD and connect to Internet wirelessly to my router. Everything is working fine from the CD but not when booting up from HDD.

Revision history for this message
FactTech (launchpad-facttechnologies) said :
#4

If this is a fresh installation, you may wish to try using your LiveCD to "rescue" the installation on your hard drive. This will make sure that all files are written correctly and that GRUB is set up the right way.

If that doesn't work, my only hunch would be that GRUB is not able to find one of the files it needs because the file is written to a part of the disk that is not accessible at that point in the boot process. This would be much more likely with a computer that has a fairly old motherboard and/or which has had its hard drive upgraded since it was originally built. Your first ext3 partition (which I assume is where your root partition is located) is at about the 15GB mark, which is what makes me suspect this as a cause.

Can you tell us the purpose of each partition on the drive? You may get better results by reinstalling and selecting "manual partitioning" instead of "guided partitioning".

Revision history for this message
Johnny Lau (johnnylau133) said :
#5

Hi FactTech,

Thanks for your input. This is in fact a fresh installation. Can you
elaborate more about the "rescue" from Live CD procedure?

I have tried to reinstall this a few times and come across the same
partition message as follow:

---------
ERROR!!!
Error informing the kernel about modifications to partition /dev/sda5 --
Device or resource busy.
This means linux won't know about any changes you made until you reboot --
so you shouldn't mount it or use it any way before rebooting
-----------

But the Partitions Status is showing that /dev/sda5 is NTFS.
/dev/sda
/dev/sda1 NTFS Size: 21474Mb Used: 0Mb
/dev/sda2 fat32 Size: 4675Mb Used: 3690Mb
/dev/sda5 NTFS Size: 8388Mb Used: 0Mb
/dev/sda6 ext3 Size: 5165Mb Used: 0Mb
/dev/sda7 swap Size: 296Mb Used: 0Mb

I did resize the partition;

But this message go away by clicking the Cancel button and installation
proceed as normal and finished.

Based on the error message, it is about the Partitioning issue but not sure
whether it is related to the GRUB issue.
More about partitions status screenshots [attached file = GRUB Error
Message.doc]. I hope this can be opened.

The partition is based on Corporate CD image that is pre-installed for Work.
So it comes with the laptop. I am using this as my backup.

On Wed, Jun 3, 2009 at 1:02 PM, FactTech <
<email address hidden>> wrote:

> Your question #73065 on grub in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/73065
>
> Status: Open => Needs information
>
> FactTech requested for more information:
>
> If this is a fresh installation, you may wish to try using your LiveCD to
> "rescue" the installation on your hard drive. This will make sure that all
> files are written correctly and that GRUB is set up the right way.
>
> If that doesn't work, my only hunch would be that GRUB is not able to
> find one of the files it needs because the file is written to a part of
> the disk that is not accessible at that point in the boot process. This
> would be much more likely with a computer that has a fairly old
> motherboard and/or which has had its hard drive upgraded since it was
> originally built. Your first ext3 partition (which I assume is where
> your root partition is located) is at about the 15GB mark, which is what
> makes me suspect this as a cause.
>
> Can you tell us the purpose of each partition on the drive? You may get
> better results by reinstalling and selecting "manual partitioning"
> instead of "guided partitioning".
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/grub/+question/73065
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Johnny Lau (johnnylau133) said :
#6

When I access Terminal from Live CD..

grub> find /boot/grub/stage1 (hd0,5)

But partitions status show

/dev/sda5 NTFS Size: 8388Mb Used: 0Mb
/dev/sda6 ext3 Size: 5165Mb Used: 0Mb
/dev/sda7 swap Size: 296Mb Used: 0Mb

Is this correct?

Revision history for this message
FactTech (launchpad-facttechnologies) said :
#7

I'm having a little trouble understanding your partitioning setup. You have:

/dev/sda1 -- NTFS -- this is a Windows-format partition, does it contain a copy of Windows?
/dev/sda2 -- FAT32 -- this is another Windows-format partition, does it contain a copy of Windows?
/dev/sda5 -- NTFS -- this is a Windows-format partition, and I would expect it to be a D: drive or something for your Windows installation, however you say that GRUB reports it can find /boot/grub/stage1 there, which is unexpected.
/dev/sda6 -- ext3 -- this is a Linux-format partition. Are you using this for your / (root) partition, your /home partition, or both?
/dev/sda7 -- swap -- this is a Linux-format swap partition and should be fine as it is.

Your problem loading is that GRUB says it can't find the stage2 file. This would usually be in the same directory as the stage1 file. Can you find the stage2 file in GRUB?

How did you set up the partitioning when you installed? Can you post the contents of your /boot/grub/menu.lst file and your /etc/fstab file?

The error message you are getting seems like more of a warning than a real problem. I don't think it's related to your boot issue, but it might be.

Revision history for this message
Johnny Lau (johnnylau133) said :
#8

Hello FactTech,

I have finally managed to get the GRUB up and running but none of the OS (UBUNTU and Windows XP) are working. I will consider this solved :). The way I resolved this is by following actions:

1. Use Live CD to boot and run Install again and once in Partitioning section,
2. Mark /dev/sda6 as "/" and then forward and reboot. (for my specific scenario)

I manage to get the GRUB menu but I am getting error message for both OS:
a. Ubuntu 9.04 - Grub Error 18
b. Windows XP - Blue Screen

I am planning to reinstall both OS but first with proper partitioning based on the setup:
Windows XP
/dev/sda1 ext2 /boot ----300mb to 1000gig
/dev/sda2 swap 512mb equals 1024mb, 1gig equals 2gig
/dev/sda3 ext3 / (what ever is left numbers) as and EXT3

I realize that the IBM T41 has old mainboard (BIOS) which might have compatibility issue with Ubuntu. I hope this will work.

To answer your question about my partitions (this is only my guess because the installation and partition is done automatically from the corporate CD installation):

/dev/sda1 -- NTFS Actual Windows XP (C:\)
/dev/sda2 -- FAT32 (Either it is D:\ or The Image File for restore the installation)
/dev/sda5 -- NTFS ((Either it is D:\ or The Image File for restore the installation)

The Corporate Image CD automatically copied the content to HDD to its own partition, which can be used to restore Windows in case it is corrupted.

Let me know your thoughts.

Revision history for this message
FactTech (launchpad-facttechnologies) said :
#9

The setup you proposed should work fine. If you are reformatting the whole drive, you might consider creating a separate ext3 partition and assign it to /home -- this will let you reinstall Linux or change your distribution while preserving all your user files.

I would recommend using ext3 instead of ext2 for your /boot partition if this is an option.

You are probably getting a Windows blue screen because you overwrote important Windows files when you tried to install for the whole disk. You are getting a GRUB Error 18 because the files it needs to boot are located too far into the disk for GRUB to find -- for many older machines it can only see the first 2GB of the drive when booting. Setting up a boot partition first as you propose should solve this issue.

It should be possible to set up a dual boot if you want to restore your old Windows system first. I'm not sure what went wrong, but if you chose "guided partitioning" the first time, the install program may have made an error and tried to set up the / (root) directory on your NTFS sda5 partition. If that happened without you changing any partition options, you may be interested in reporting this as a potential bug.

I usually get best results using manual partitioning when I want to set up a dual boot, since you can be very specific about how you want each partition to be treated, and tell it to leave existing partitions alone or move them around as you see fit. It sounds like you have enough knowledge now to make this work for you. Best of luck!

P.S. It seems that the 9.04 LiveCD doesn't have a rescue/recover option on the main menu, so never mind about that.

Revision history for this message
FactTech (launchpad-facttechnologies) said :
#10

Also, if you consider this issue resolved, please mark the question solved so it is not left open.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

I would restart the whole show with proper partitioning rather than this resizing malarky. If you plan yourpartitions you will get less issues and there is less risk of data loss.

A home partition is an excellent idea, simply use 10Gb for /, 1Gb for swap (enough in modern PCs) and use the rest for /home.

If you want a boot partition make it about 100Mb (my suggestion)

Revision history for this message
Johnny Lau (johnnylau133) said :
#12

I can't see the button to mark it as "solved". I can see a button in actionparsnip message box on 2009-06-03

"This solved my problem". But I don't think that is correct.

Revision history for this message
Johnny Lau (johnnylau133) said :
#13

Hello FactTech,

Just want to confirm with my plan for partitioning:

Windows XP
/dev/sda1 ext2 /boot ----300mb to 1000gig
/dev/sda2 swap 512mb equals 1024mb, 1gig equals 2gig
/dev/sda3 ext3 / (what ever is left numbers) as and EXT3

With the Windows XP partition, if I set to 20 Gb. then the next partitions are for Linux as per above plan. Will the system suffer any booting issue? Because you said "- for many older machines it can only see the first 2GB of the drive when booting". Thanks.

Revision history for this message
FactTech (launchpad-facttechnologies) said :
#14

I think the fact that you are planning a separate /boot partition at the start of your drive should prevent the 2GB limit issue from affecting you. As I understand it, all of the files needed to boot will be in the /boot partition -- once those are loaded, there should be no problem accessing the rest of the drive.

I don't generally create a separate /boot partition, so I don't know how much room it requires, but it shouldn't be all that much. You may want to follow actionparsnip's advice on sizing it to avoid wasting space on your drive. My /boot directory uses a little under 80MB on a Xubuntu 8.10 installation, as a comparison.

The "this solved my problem" button will mark this as a solved question. Best of luck to you, and welcome to the Ubuntu community.

Can you help with this problem?

Provide an answer of your own, or ask Johnny Lau for more information if necessary.

To post a message you must log in.