Can't boot from CD. Grub Rescue> - Initramfs - Only Linux commands will save me.
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't boot from CD. Grub Rescue> - Initramfs - Only Linux commands will save me.
This is a doozy! I tried to partition change and crashed. I worked through grub rescue> with some Linux commands I found online, but now I'm stuck at "initramfs" prompt.
I can't boot anything from CD/DVD drive or USB. I can open BIOS, but no options there to boot from CD. I guess I screwed up the MBR?
The MBR has absolutely nothing to do with booting from a CD, DVD or a USB disk.
What is important is the BIOS configuration (computer setup). When you start your computer you should see messages saying which keys to press to get into the BIOS settings. If you see a graphical logo, try pressing the Esc key or the Tab key. Then you may see a text screen with the BIOS messages.
You may see that there is a key you can press to get a boot menu. For example on some computers you press F11 for a boot menu. Then you can choose to boot from the CD/DVD drive or the USB drive instead of the default (internal hard disk).
If you can't use a boot menu, then you will have to change the BIOS settings. Go into the BIOS settings. There is usually a way to change the boot priority (or boot order). Sometimes there is a separate menu for the disks, and a separate menu for the different types of devices, CD, hard disk, network, etc. You need to make sure that the CD/DVD drives appear before the hard disks, and that the required drives are enabled for booting. To boot a USB hard disk you have put it before the normal internal hard disk in the boot order. You have to connect the USB (or other external disk) before going into the BIOS setup or it may not appear in the settings.
Once you can boot from the installation disk for your Linux operating system then you can see if your hard disk has valid information (partitions, file-systems and files). First, start a shell command prompt using the root account. Then use "fdisk" or "cfdisk" to see if you have partitions on the hard disk. If you have partitions, you can use "fsck" to check that the Linux file-system is valid. If it is valid, mount the Linux partition using "mount". Then use "ls" to see what directories and files are in the Linux partition.
If the partitions and files look correct, it's possible that you only need to install or re-install your boot loader. If the Linux kernel or initrd file is not correct, you will have to install Linux or copy the correct files onto the hard disk.
Most Linux distributions (distros) install a boot loader to the Master Boot Record (Partition Table sector) of the first hard disk. That is the first sector on the hard disk. It is also possible (though unusual) to install the boot loader to a partition (in the partition's boot sector).
The boot loader's files should be in a partition on the first hard disk (usually your Linux partition). You have to make sure that the order of the hard disks does not change after installing the boot loader. Usually the order of the hard disks is the same as the boot order in the BIOS.
After the boot loader has started, it loads in the Linux kernel and possibly an initram FS (initrd) file. Where those can be located depends on the boot loader and whether the computer uses a BIOS or UEFI/EFI firmware. The boot loader also tells the Kernel the location of the root file-system (that it gets from the boot menu or boot configuration). You may be able to override or change the file locations or root file-system location when the boot loader's menu is displayed.
If you want more specific help, please post some additional information about your system.
What Linux distribution are you using, and what is the version?
What boot loader are you using (GRUB 2, LILO, GRUB Legacy)?
Does your computer use UEFI or EFI (you will probably see a message mentioning that)?
What is the manufacturer and model of your computer (or motherboard)?
What hard disks and CD/DVD drives are connected?
How is your internal hard disk partitioned, or how do you want to partition it?
Is there anything already on the internal hard disk that you care about losing?
Do you have any other operating systems installed, or are you planning to install others?
Exactly what error message do you see, and what are the messages leading up to the problem?
What did you try to correct the problem and what happened as a result?
When a computer with a BIOS boots from the hard disk it goes through these steps.
Computer resets and goes through BIOS Power On Self Test (POST)
BIOS tries to boot first boot device (usually first hard disk)
BIOS reads the Master Boot Record from the first hard disk
If a boot loader is installed to the MBR, start loading the boot loader
If no boot loader installed to MBR, find the first primary partition marked for "Boot"
If a partition is marked for "Boot" load in the boot (first) sector of the partition
At this point a boot loader has started up and usually displays a boot menu (or prompt)
The boot loader loads in the Linux kernel file, EX: /boot/vmlinuz
If requested, the boot loader loads in the initrd (initram FS) file, EX: /boot/initrd.gz
The Linux kernel starts up (boot loader tells it the root device name and initram FS location)
At this point you may get errors if the initram FS information or the root device name is incorrect
The kernel mounts the initram FS (that is in memory) if it was specified
The initram FS runs programs to mount the Linux root device, or the kernel mounts the Linux root device
After the Linux root device is mounted, the "init" program runs and Linux starts up
If you happen to have UEFI (or EFI) then the start up is a little bit different.
Computer resets and goes through UEFI firmware initialization
UEFI firmware looks at its boot configuration to locate the boot loader.
The boot loader is usually located in the EFI System Partition on the first hard disk
UEFI firmware loads and starts the boot loader
At this point a boot loader has started up and usually displays a boot menu (or prompt)
The remainder of the steps are the same as for a BIOS (step 8)
UEFI does not use a Master Boot Record or boot sectors (in partitions). Boot loaders have to be added to the firmware's configuration (NVRAM variables) or be in a default location. The default location for the boot loader is the EFI System Partition on the first hard disk, in the "/EFI/BOOT" directory. Boot loaders are usually installed under the "/EFI" directory in the EFI System Partition on the first hard disk.
Thank you so very much for all that information. I'll have to go through all of it point-by-point. When I get finished I'll post all information and the status. Very cool of you to take the time for such an in-depth response. I need a few hours sleep and I'll be on it tomorrow.
I hope you're still available and willing to help me get through this disaster. Again, many thanks.
I think my problem is that I can't boot from CD. I have “Boot Repair Disk”, a grub boot disk, a Fedora 15 install disk and a Windows 7 Home Premium SP1 disk from a different computer. I was going to try the Boot Repair Disk first, but just can't get the thing to boot.
When I hit the F2 on the ASUS K52F, the BIOS opens (Aptio Setup Utility, American Megatrends). My available tabs are: Main – Advanced – Boot – Security – Save & Exit.
At the Boot tab I get this Default Boot Configuration list: (I selected the Default settings at one point)
Hard Drive BBS Priorities
CD/DVD ROM Drive BBS Priorities
Delete Boot Option
Under the Advanced Tab
Start Easy Flash
ASUS FanceStart [Disabled]
POST Logo Type [Static]
Play POST Sound [No]
Internal Pointing Device [Enabled]
Intel Virtualization Technology [Enabled]
VT-d [Enabled]
Legacy USB Support [Enabled]
SATA Configuration
Under the Security Tab:(I was afraid to attempt putting in a Password, read it could be problems) COULD THIS be the problem?
Password Description
If ONLY the Administrator's password is set, then this only limits access to Setup and is only asked for when entering Setup.
If ONLY the User's password is set, then this is a power on password and must be entered to boot or enter Setup. In Setup, the User will have Administrator rights.
Administrator Password Status NOT INSTALLED
User Password Status NOT INSTALLED
Setup Administrator Password
Setup User Password
I/O Interface Security
HDD Security Configuration:
HDD 0:ST9500325AS
Here are the answers to the additional info you asked for:
What Linux distribution are you using, and what is the version?
Ubuntu 12 (.04 or .10, not sure)
What boot loader are you using (GRUB 2, LILO, GRUB Legacy)?
Unknown
Does your computer use UEFI or EFI (you will probably see a message mentioning that)?
UEFI is listed in Boot options
What is the manufacturer and model of your computer (or motherboard)?
ASUS K52F
What hard disks and CD/DVD drives are connected?
500 GB Internal; CD/DVD internal
How is your internal hard disk partitioned, or how do you want to partition it?
One hard drive partitioned to C and D drives with 2 smaller partitions when Ubunto installed
Is there anything already on the internal hard disk that you care about losing?
Yes BUT... this is an emergency situation. I can live with total format
Do you have any other operating systems installed, or are you planning to install others?
The original Win7 Home Premium and Ubuntu are/were installed
Exactly what error message do you see, and what are the messages leading up to the problem?
It started when I tried to move some disk space from D to C drive. I used a free utility to do it and at some point it said to reboot. When I did, I got the grub rescue> prompt.
What did you try to correct the problem and what happened as a result?
I tried Linux commands I found on the 'net at the grub rescue prompt. I eventually got the initramfs prompt, but could find nothing to complete the process of repair.
Do you get to the grub prompt. If so what have you tried how far did you get?
Thanks for your reply.
Yes, I only get the "error: unknown filesystem - grub rescue>" prompt when I boot up. From there I found information about the grub prompt. I used linux commands to change Hard Drive settings, and followed that all the way until I got a prompt that says: "initramfs".
That is where I got stuck... I couldn't find any usable commands for initramfs to solve the problem. I then tried to use a repair disk... "Boot Repair Disk", and discovered problems booting from CD\DVD (or USB).
I believe this problem could be solved with Linux commands or with booting a repair disk from BIOS. My problem is I can't boot from CD/DVD.
I hope this thread helps other people with this problem. There are a LOT of grub rescue problems out there.
when I boot from grub prompt
after the line vmlinuz root=/dev/sdx ro
I put initrd /boot/ then if you use the "tab key" it will show the initrd.img-3.8.0-18-generic Put that in after /boot/. Then press "enter"
Then type boot
ST9500325AS - starting with ST means it is a Seagate hard disk
HL-DT-STDVDRAM - this is your DVD drive
If the BIOS finds grub in the MBR it will try to boot from the hard drive first. If you need to boot from DVD you need to put that choice as #1 and the hard drive as #2. Depending on how badly your BIOS is written, you may have to delete the old ones to add new ones. If your BIOS is even worse, you may have to take the hard drive out of the list.
Note: The first rule of fixing a disk problem is to sit on your hands until you are sure you are doing the right thing.
Last edited by smallpond; 05-12-2013 at 01:12 PM.
Reason: add note
Hard Drive BBS Priorities
CD/DVD ROM Drive BBS Priorities
Delete Boot Option
The above information from your BIOS settings shows that the hard disk "ST9500325AS" will be booted before the DVD drive "HL-DT-STDVDRAM". In order to boot from a DVD or CD you will have to change the BIOS settings and make the "HL-DT-STDVDRAM" the first boot option.
You have firmware that supports UEFI or BIOS booting. UEFI booting is disabled. That is OK because your disk is small enough that you can use a Master Boot Record partition table and BIOS booting.
Quote:
Originally Posted by Wet Willie
Under the Security Tab: (I was afraid to attempt putting in a Password, read it could be problems) COULD THIS be the problem?
It is OK to have no BIOS password for setup or booting. That just allows anyone to change the computer settings or start up an operating system without a password.
When you changed the partition sizes it also changed the position of files on the disk. In order for grub to work, the grub program file "core.img" and grub boot sector cannot be moved after grub is installed. So, you will need to install grub again.
To install grub, change your computer settings to boot from the DVD drive first, before the hard disk. Boot from a Ubuntu live-CD or live-USB.
Follow the instructions for "2nd option : install Boot-Repair in Ubuntu" on this web page. Ubuntu Help Wiki - Boot-Repair
You may need to use the option to "repair file systems".
If you are able to get Linux to boot, but not Windows, then you also may need to repair Windows using the Windows setup DVD. After repairing Windows, don't be surprised if you no long have grub. You may need to install grub again after repairing Windows.
ST9500325AS - starting with ST means it is a Seagate hard disk
HL-DT-STDVDRAM - this is your DVD drive
If the BIOS finds grub in the MBR it will try to boot from the hard drive first. If you need to boot from DVD you need to put that choice as #1 and the hard drive as #2. Depending on how badly your BIOS is written, you may have to delete the old ones to add new ones. If your BIOS is even worse, you may have to take the hard drive out of the list.
Note: The first rule of fixing a disk problem is to sit on your hands until you are sure you are doing the right thing.
Thanks smallpond. I just went through the linux commands suggested above by spiky. A lot of info loaded on the screen which I can't make any sense of. It's been 45 minutes and nothing has happened. Not sure if it's repairing/reinstalling or what (?) --
I will try to switch to the DVD drive and reboot after I wait this out a while and see if anything happens. Thanks again.
Thanks smallpond. I just went through the linux commands suggested above by spiky. A lot of info loaded on the screen which I can't make any sense of. It's been 45 minutes and nothing has happened. Not sure if it's repairing/reinstalling or what (?) --
I will try to switch to the DVD drive and reboot after I wait this out a while and see if anything happens. Thanks again.
Thanks Erik! I've got several more things to try now. Right now part of the screen says "Loading, please wait", but it's been 45 minutes without change. I do hear a faint hum... don't know if it's repairing/loading or if it's just the fan. I'll wait this out a while before trying anything else. Appreciate your help -----
The above information from your BIOS settings shows that the hard disk "ST9500325AS" will be booted before the DVD drive "HL-DT-STDVDRAM". In order to boot from a DVD or CD you will have to change the BIOS settings and make the "HL-DT-STDVDRAM" the first boot option.
You have firmware that supports UEFI or BIOS booting. UEFI booting is disabled. That is OK because your disk is small enough that you can use a Master Boot Record partition table and BIOS booting.
It is OK to have no BIOS password for setup or booting. That just allows anyone to change the computer settings or start up an operating system without a password.
When you changed the partition sizes it also changed the position of files on the disk. In order for grub to work, the grub program file "core.img" and grub boot sector cannot be moved after grub is installed. So, you will need to install grub again.
To install grub, change your computer settings to boot from the DVD drive first, before the hard disk. Boot from a Ubuntu live-CD or live-USB.
Follow the instructions for "2nd option : install Boot-Repair in Ubuntu" on this web page. Ubuntu Help Wiki - Boot-Repair
You may need to use the option to "repair file systems".
If you are able to get Linux to boot, but not Windows, then you also may need to repair Windows using the Windows setup DVD. After repairing Windows, don't be surprised if you no long have grub. You may need to install grub again after repairing Windows.
I replied to the wrong comment..... -->
Thanks Erik! I've got several more things to try now. Right now part of the screen says "Loading, please wait", but it's been 45 minutes without change. I do hear a faint hum... don't know if it's repairing/loading or if it's just the fan. I'll wait this out a while before trying anything else. Appreciate your help -----
I got the boot order changed... I ad to disable the Seagate internal HD to get anything to happen, then....
tried to boot first with "Boot Repair Disk", then with a different brand repair disk. I got the message:
"Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key." It looks like the CD/DVD drive isn't being recognized?
I finally got a Win7 install disk to work boot, but stopped it. It's from another computer and I was afraid MSoft wouldn't let me install it on a different computer. (?)
I'm downloading Ubuntu now on my other pc (which has Ubuntu). I've got to burn it to DVD and try it.
Question spiky:
Will I be able to save my Win7 when I re-install Ubuntu?
If Win7 disappears, can I download it from MSoft? I have the product key.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.