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.
Hello, I am new to Linux. Overall it's awesome, but I run into a lot of problems. So far none have been major, and I've been able to get past pretty much all of them. However, this one problem is quite annoying and so far I haven't been able to fix it.
When booting up, after I select the default entry in Grub, sometimes I get this error after it tries to load for a bit:
Code:
Starting up...
Loading, please wait...
usplash: Setting mode 1152x864 failed
usplash: Using mode 1024x768
Gave up waiting for root device. Common problems:
-Boot args (cat /proc/cmdline)
-Check rootdelay= (did the system wait long enough?)
-Check root= (did the system wait for the right device?)
-Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/sda2 does not exist. Dropping to a shell!
BusyBox v1.10.2 (Ubuntu 1:1.10.2-1ubuntu7) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)_
The weird thing is that if I reboot a few times, it eventually starts normally with no error.
My setup is: Linux Mint 6 and Windows XP dual-boot on a SATA hard drive (XP in 1st partition, Mint in next 3). I also have an IDE hd I use for storage.
As I normally do with problems that come up in Linux, I googled it, but I didn't find a definite answer, just different possibilities about missing SATA driver modules, udev rules, and conflict between IDE and SATA drives. And honestly I didn't understand half of the stuff I found, so I'm a bit at a loss now. Any help would be GREATLY appreciated.
What is the output of fdisk -l (you might have to be root or use sudo)?
I would guess that it's the "conflict between IDE and SATA drives" problem. If you get an output from the above command that lists /dev/sda and /dev/sdb, I would guess this is the problem. What may be happening is that the IDE drive is being labeled as a SATA drive. As such, your first drive may be booting up as the second drive (/dev/sdb) and vice versa. The every few reboots, it picks the correct order for the drives making your primary drive /dev/sda like it should be.
I think the new way to get around this is to specify UUID's for each drive. I haven't played with UUID's myself since my machine has so far (knock on wood) behaved correctly.
Ah, yes, old problem that is typical of debian based distros. The root of the problem is that you have two or more hard drive controllers and that the operating system gets confused every so often. The best solution is to use labels or UUIDs. I tend to prefer labels because they are a lot more informative and flexible than an UUID, which will typically look as informative as 465464-456413136-454646.
If you use ext2/ext3, you can set a label like so:
sudo tune2fs -L mint_root /dev/sda2
This would label the second partition "mint_root".
Once a partition has been labeled, you need to edit /etc/fstab something like this:
LABEL=mint_root / ext3 noatime,nodiratime 0 0
And then, obviously, you will also need to edit your grub menu.lst to make a real difference.
I had a situation where the BIOS sees drive order one way and the kernel sees it another. So when grub boots, (hd0,0) is one disk, but after linux loads grub thinks that (hd0,0) is another drive. This makes it difficult to update grub in Linux. The solution for me was to edit the /boot/grub/device.map file to map the (hdX,X) style names to /dev/sdXX style.
Also look at using the drive IDs in grub and /etc/fstab.
Wow I didn't expect replies so fast, thanks. I think I fixed it now, by using a label for my root partition and by changing the device.map file. Although, these changes only took effect after I reinstalled grub. I rebooted many times and so far no more error message, so I'm pretty sure it's problem solved. Thanks guys!
EDIT: Not solved, see below.
Last edited by fipi; 04-09-2009 at 07:25 AM.
Reason: problem not solved
Hi everybody, this is my first post here. I am also new to Linux. I am facing the same problem. Though I am not able to understand most of the things you people said. I did as much to change the label of my boot partition, ie. /dev/sda9. cause it said that it couldn't find sda9.
Now what do I do? can somebody guide me through the steps? and I will need a step by step guide. cause obviously the posts above solved fipi's problems. But as I am a very newbie so, I can't understand half of what is being said....
Last edited by Ritwick Chakraborty; 04-09-2009 at 02:30 PM.
Reason: coded the outputs...
Argh, apparently my problem is not fixed. I was writing a reply to Ritwick, when I noticed that I used the "mint_root" label in the wrong entry in /boot/grub/menu.lst, so I was actually still booting into /dev/sda2. So then I tried replacing root=/dev/sda2 with root=mint_root and then root="mint_root", but both times booting failed completely. So I decided it didn't matter since it was working anyways, but after I changed it back to /dev/sda2 I got that error again when booting up. How do I use a label (or a UUID) instead of /dev/sda2 in menu.lst? I'm guessing that will fix my problem, but if you have other ideas please post them.
More info, if you need it:
fdisk -l output:
Code:
Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xdac4a1d0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 19612 157533358+ 7 HPFS/NTFS
/dev/sda2 19613 21358 14024745 83 Linux
/dev/sda3 21359 21622 2120580 82 Linux swap / Solaris
/dev/sda4 21623 77825 451450597+ 83 Linux
Disk /dev/sdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc06e7af3
Device Boot Start End Blocks Id System
/dev/sdb1 1 4865 39078081 83 Linux
fstab:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2
# (below line commented out because using a label instead of UUID)
#UUID=c46fcce6-af26-49bd-92ee-5a917416431f / ext3 relatime,errors=remount-ro 0 1
LABEL=mint_root / ext3 relatime,errors=remount-ro 0 1
# /dev/sda4
UUID=7a82e4e0-ba38-4c85-a5d6-82e49fb70001 /home ext3 relatime 0 2
# /dev/sda3
UUID=bf0d77d4-650d-4575-9a17-72a1e8603b5b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
Argh, apparently my problem is not fixed. I was writing a reply to Ritwick, when I noticed that I used the "mint_root" label in the wrong entry in /boot/grub/menu.lst, so I was actually still booting into /dev/sda2. So then I tried replacing root=/dev/sda2 with root=mint_root and then root="mint_root", but both times booting failed completely. So I decided it didn't matter since it was working anyways, but after I changed it back to /dev/sda2 I got that error again when booting up. How do I use a label (or a UUID) instead of /dev/sda2 in menu.lst? I'm guessing that will fix my problem, but if you have other ideas please post them.
Well yes, of course you need to edit grub as well (/boot/grub/menu.lst). Here is mine, zoom in on the "kernel" line, it's the only one that needs editing.
Awesome, it works now. I got some free time now (4 day weekend ), so here's a walkthrough of what I did, newbie-friendly format. I don't know if everything I did was necessary, but I'll just write it all down anyways. If you do all the steps in part A and that fixes your problem, awesome. Otherwise just try part B as well.
Here I use the label "linux_root", but you can use whatever you like.
Also, replace "/dev/sdax" with whichever partition is root. If you're not sure which is the root partition, open a partition editor (like Gparted) and the partition with a mountpoint of "/" is what you're looking for.
A) Setting up a label for the root partition
1) Run sudo tune2fs -L linux_root /dev/sdax
2) Open /etc/fstab. Under /dev/sdax replace "UUID=xxxxxx..." with "LABEL=linux_root". Remember to save your changes.
3) Open /boot/grub/menu.lst. In that file find your main bootloader entry. If you don't know where that is, it's probably the first place where a line begins with "title", next line "root", and the next one "kernel". The kernel line contains "root=/dev/sdax". Replace this with "root=LABEL=linux_root".
B) Mapping hard drive partitions
Open /boot/grub/device.map. It should contain hard drive mapping(s) like "(hd0) /dev/sda". If you have more than one hard drive, it will go on with /dev/sdb, /dev/sdc, etc.
Add this in the file:
(hd0,0) /dev/sda1
(hd0,1) /dev/sda2
... and so on, one for each partition. (Check in a partition editor if you're not sure how many partitions your hard drive has.) Repeat for any additional hard drives, replacing hd0 with hd1, hd2, etc., and replacing sda with sdb, sdc, etc.
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## Graphical boot menu location
gfxmenu=/boot/gfxmenu/default.message
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda9 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,7)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Linux Mint 6, kernel 2.6.27-7-generic
root (hd0,7)
kernel /vmlinuz-2.6.27-7-generic root=/dev/sda9 ro quiet splash
initrd /initrd.img-2.6.27-7-generic
quiet
title Linux Mint 6, kernel 2.6.27-7-generic (recovery mode)
root (hd0,7)
kernel /vmlinuz-2.6.27-7-generic root=/dev/sda9 ro single
initrd /initrd.img-2.6.27-7-generic
title Linux Mint 6, kernel Last successful boot
root (hd0,7)
kernel /last-good-boot/vmlinuz root=/dev/sda9 ro quiet splash last-good-boot
quiet
title Linux Mint 6, memtest86+
root (hd0,7)
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
fipi, I tried it out.. but I guess to no avail.
It shows
Code:
Starting up...
Loading, please wait...
usplash: Setting mode 1152x864 failed
usplash: Using mode 1024x768
Gave up waiting for root device. Common problems:
-Boot args (cat /proc/cmdline)
-Check rootdelay= (did the system wait long enough?)
-Check root= (did the system wait for the right device?)
-Missing modules (cat /proc/modules; ls /dev)
ALERT! LABEL=mint_root does not exist. Dropping to a shell!
BusyBox v1.10.2 (Ubuntu 1:1.10.2-1ubuntu7) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)_
Here are the relevant files.. just check whether I did them right or not?
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## Graphical boot menu location
gfxmenu=/boot/gfxmenu/default.message
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=LABEL=mint_root ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda9 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,7)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Linux Mint 6, kernel 2.6.27-7-generic
root (hd0,7)
kernel /vmlinuz-2.6.27-7-generic root=LABEL=mint_root ro quiet splash
initrd /initrd.img-2.6.27-7-generic
quiet
title Linux Mint 6, kernel 2.6.27-7-generic (recovery mode)
root (hd0,7)
kernel /vmlinuz-2.6.27-7-generic root=/dev/sda9 ro single
initrd /initrd.img-2.6.27-7-generic
title Linux Mint 6, kernel Last successful boot
root (hd0,7)
kernel /last-good-boot/vmlinuz root=/dev/sda9 ro quiet splash last-good-boot
quiet
title Linux Mint 6, memtest86+
root (hd0,7)
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.