Tag Info

Hot answers tagged

25

file -s didn't work for me in Ubuntu Lucid. Another way to do this is to examine the first 512 bytes of the device using the dd command like this: user@host:~$ sudo dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings ZRr= `|f \|f1 GRUB Geom Hard Disk Read Error This sends the output of the dd command through the strings command thus stripping out ...


24

First the lecture: Rule Number Zero: If you do not understand what something does, DO NOT TOUCH IT Deleting files "to save space" with no concept of what you are doing will anger the operating system gods, resulting problems similar to what you are now experiencing (Things break. Fixing them is often non-trivial). Now the sympathetic assistance: ...


17

Here are instructions for Ubuntu 10.10, which are slightly different from prior versions. In file /etc/grub.d/00_header comment out the stupid check for a prior boot failure: ##if [ \${recordfail} = 1 ]; then ## set timeout=-1 ##else set timeout=${2} ##fi Then update: sudo update-grub Be aware that if there is a second drive with Linux attached, ...


15

you can use file(1) to identify GRUB in an MBR. e.g. # file -s /dev/sda /dev/sda: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0xfd, starthead 1, startsector 63, 1044162 sectors; partition 2: ID=0x82, starthead 0, startsector 1044225, 1028160 sectors; partition 3: ID=0xfd, ...


12

For Ubuntu 12.04 LTS there is a specific option that can be set in /etc/default/grub. For example, if you want to have a 2 seconds timeout (thus avoiding hangs for unattended reboots) just add the following line in /etc/default/grub: GRUB_RECORDFAIL_TIMEOUT=2 Remember to run update-grub after that...


8

Ubuntu has a "cute" (read: annoying) feature where it records a boot failure and sets a grub timeout of -1, disabling auto-boot. You aren't the only one that doesn't like it, see here. You should be able to work around this by editing /etc/grub.d/00_header, find the section that reads.. if [ "\${recordfail}" = 1 ]; then set timeout=-1 ..and change it ...


7

I am using grub4dos to dual boot XP and XP64. Both systems are on NTFS filesystems. Setup was simple: I copied the grub4dos folder onto my NTFS file system. Renamed the windows boot loader "ntldr" out of the way and copied the grub4dos boot loader "grldr" to "ntldr". That way I am still using a microsoft standard MBR which makes my corporate required ...


6

I came across this deeply unpleasant design oversight with Ubuntu Server 9.10. Your fix has helped me enormously. I just wanted to point out that the fix needed for 9.10 is different as there is no "make_timeout ()" function in the same file. For Ubuntu 9.10, go to the end of the same file (00_header) and change the following: if [ \${recordfail} = 1 ]; ...


6

One method: Append init=/bin/bash to the end of the grub line which begins with linux (and ends with quiet). Reset your password and reboot normally. Don't forget it again. Consider installing sudo. Another method: Since this is apparently a virtual machine, you can mount its disk on another (working) virtual machine and manually remove the password ...


5

Are you using a particular distribution? On Debian based distributions it would be as simple as adjusting /etc/default/rcS and set FSCKFIX to yes. If you want to force a full fsck after every boot, then you could simply write create an empty file named /forcefsck. Though I do not suggest you actually do this.


5

You souldn't need to re-run grub you would, but after a kernel change you may need to run /usr/sbin/update-grub. Those messages are probably do not indicate an issue. The real test would be to simply reboot the computer. If it boots fine, then nothing bad happened. You may want to update your /etc/kernel-img.conf and disable the do_symlinks option, and ...


5

To quote a bit from the GRUB Manual which adds a bit of extra checking for katriel's answer. You can teach GRUB to boot an entry only at next boot time. Suppose that your have an old kernel old_kernel and a new kernel new_kernel. You know that old_kernel can boot your system correctly, and you want to test new_kernel. To ensure that your system will ...


5

This can be achieved quite easily by using the dd(1) command and copying the first 512 bytes from a given medium. Like: dd if=/dev/sdX of=mbr-sdX bs=512 count=1 Then check if that file contains the hex signature ``0xAA55'' (don't forget to account for endianess of the machine). See [1] for more details. ...


5

Ok I found solution myself via shlug mail list. what you do is to modify the /etc/grub.d/00_header and find: if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=3 fi change timeout = -1 to 0. -1 means manual selection. also remember to update-grub afterward, to generate the actual grub.cfg


4

I stumbled onto the answer in the grub2 debian source package. It turns out that it does require a dump of the bootsector - so a separately packaged script might be useful. Here is a script (just a wrapper around the official function) that will tell you whether or not grub2 has been installed into the boot sector. It can be easily modified for similar uses. ...


4

Update: Based on your entry, I found the article "Grub chainloads syslinux and back", which basically says "patch grub": Chainloading syslinux from GRUB seems not to be possible without a patch. I don't know about GRUB2. This could be useful for multi-booting (syslinux-based) partitions. Chainloading syslinux from GRUB4dos (on different ...


4

This is embarrassing but after two days of bashing my head on this, I think I solved it myself. My grub menu file had commands like root(hd0,0) instead of root (hd0,0). The space is essential, and all my attempts left it out! I found this out by discovering that leaving the root line off and specifying the full path like kernel (hd0,0)/boot/vmlinuz.... ...


4

This is rather a bug and the solution is already given at how to force grub to boot (no human input) regardless previous booting failure bug: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/841009


4

In Debian/Ubuntu, grub.cfg is fully generated by scripts and any manual changes made to it will be clobbered. In RHEL/CentOS however, grub.cfg is modified by scripts but manual changes are persisted, and is actually the canonical location for certain settings. The tool which manages grub.cfg is grubby, which is called by /sbin/new-kernel-pkg when kernels ...


4

Grub is able to read from your root file system all by itself. It is in essence a miniature operating system: it has driver code to talk to (some of) your hardware, and it has file system code to understand the layout of your filesystem. Take a look in /boot/grub. The *.mod files are driver modules: ata.mod for ATA hard drives, ext2.mod for ext2/3 file ...


3

Here's a description of a process. They used a large swap partition to host root filesystem during the change. You do not need this trick, because you have 2nd HDD. A trick question: does your server support booting from the 2nd HDD? Can you set it up to boot from 2hd HDD? I think you could simplify the solution and not change the /boot partition. ...


3

With Virtuozzo, you don't get the ability to choose your own kernel. If you need this functionality, you'll need to choose a Xen-based VPS provider that allows users to provide their own kernel. I know that Linode allows this via pv-grub, and I'm sure there are others that allow this as well.


3

You can install GRUB from pretty much any Linux LiveCD. However, for this to work GRUB needs a partition in which to store image files and configuration files (e.g. menu.lst). This can be any partition. However, GRUB does not support NTFS. So these files need to be stored on a FAT32 or Linux partition. If you don't have one, you just need to create a small ...


3

This was reported as bug #841009 for ubuntu. I tried setting -1 to 0, but didn't work for me. So i tried another solution given here: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/841009 Quote: [...] solution is to set GRUB_HIDDEN_TIMEOUT=-1 as suggested on ubuntu forums at this page http://ubuntuforums.org/showthread.php?t=1403517 but i've not ...


3

You're waiting too long during boot time. The login screen you're referring to is part of your (most likely) Gnome desktop manager. When you are booting up, there should a period of time when you're screen turns black or a small cursor flashes at the top of the screen. Usually hitting escape will give you the grub screen, as on most distros this screen is ...


3

This sounds a lot like a similar issue I experienced on my Nexenta installation. I had recently done a ZFS version upgrade across both the syspool and my other pools, but failed to re-install grub afterwards. The result was that the next power outage left grub unable to read the ZFS filesystem and the system was unbootable. There was a discussion over at ...


3

Grub is a bit weird in it's device naming scheme. The part that says root (hd0,0) tells grub where to find the boot partition. This has to be a physical partition, like sda1. In the above example, hd0,0 means the first partition of the first physical drive. Sadly, grub does not follow the normal convention of calling the first partition 'partition 1', but ...


3

The thing about Grub is that is is invoked before the rest of the linux system is (obviously), so it doesn't know anything about your software raid. It only sees the bare hard drives. So, it is very important to install grub on both drives of your RAID1 array. The BIOS will pick one to boot from, and if grub is not installed on that drive, it will not boot. ...


3

Play with the SATA options in the BIOS - AFAIK "Combined" mode lets you access IDE or SATA (so different kernels can do different things... think it changed ~2.6.18) - try enhanced mode, and I think you'll get SDA all round, assuming the older kernel manages it ok, which it probably will. Edit: FWIW, SmoothWall (where I work) found this on the UTM hardware ...


3

Some slightly non-specific Debian information.. Make sure that /etc/fstab contains no mention of the MD devices. I would presume that it doesn't, as you are able to otherwise boot. Debian appears to perform some magic with /boot/grub/menu.lst. Check whether it contains an entry akin to this and re-run update-grub. #kopt=root=/dev/sda1 If you are ...



Only top voted, non community-wiki answers of a minimum length are eligible