[Solved] grub in minimal mode, not using my menu.lst

Hi everyone,
Installed Archlinux (using chakra livecd) on a friend's laptop, but for some reason have grub only in minimal mode... I can boot using
configfile /boot/grub/menu.lst
but I need to retype this at each boot...
Partition layout is :
* sda1 : Windows Vista
* sda2 : HP resue partition
* sdb1 : archlinux root ("/"). /boot is on this partition
* sdb2 : /home
My menu.lst works as expected.
I tried to run
grub-install /dev/sdb
no error appears on the output, but no effect on next reboot
I also tried this on the grub prompt :
root (hd1,0)
setup (hd1)
Same thing, no error reported, but no effect on reboot.
Any idea ?
Last edited by willy9 (2009-07-01 14:44:25)

D'oh !!!
I just realized that
grub-install /dev/sda
solved everything... Sorry for the noise

Similar Messages

  • [SOLVED] GRUB: Error 15: File not found

    I've used the beginners guide to install Arch on my laptop and everything went smooth untill I rebooted and ended up with GRUB error 15. I've seen some other people having trouble with this one but neither of the solutions that worked (or didn't work) for them have worked out for me. I will try to provide you with as much information as possible:
    I get to the GRUB menu and get the error after choosing 'Arch Linux' from it.
    menu.lst
    title Arch Linux
    root (hd0,0)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/0b899428... ro vga=773
    initrd /kernel26.img
    The only thing I've changed in menu.lst is that I've added vga=773. I left out the rest of the UUID because I'm writing it of my laptop beside me.
    fdisk -l
    Device Boot Start End Blocks ID System
    /dev/sda1 * 1 13 104422 83 Linux
    /dev/sda2 14 144 1052257+ 82 Linux swap / Solaris
    /dev/sda3 145 1101 7687102+ 83 Linux
    /dev/sda4 1102 9729 69304410 83 Linux
    blkid
    /dev/sda1: UUID="1afac34a-..." TYPE="ext2"
    /dev/sda2: TYPE="swap" UUID="abd14101-..."
    /dev/sda3: UUID="0b899428-..." TYPE="jfs"
    /dev/sda4: UUID="3b33ca9f-..." TYPE="jfs"
    I've also tried poking around in the GRUB console:
    grub> root (hd0,0)
    Filesystem type is ext2fs, partition type 0x83
    grub> setup (hd0)
    Checking if "/boot/grub/stage1" exists... no
    Checking if "/grub/stage1" exists... yes
    Checking if "/grub/stage2" exists... yes
    Checking if "/grub/e2fs_stage1_5" exists... yes
    Running "embed /grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
    Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
    Running "install /grub/stage1 (hd0) grub/stage2 p /grub/menu.lst "... succeeded
    Done.
    Any help would be much appreciated and I'll gladly provide you guys with any other information if necessary.
    EDIT: Solved through re-installing.
    Last edited by zulustar (2009-09-13 20:20:57)

    I moved the boot parition to hdd sda, but doing so I had to reinstall everything, and it seemed to fix it. I also found that one of the sata cables had been knocked out, but I don't think that was the orginal fault.
    ibendiben wrote:
    fumbles wrote:
    timeout 5
    default 1
    color light-blue/black light-cyan/blue
    #(0) Arch
    title Arch Linux
    root (hd2,0)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/blah(aka sda1) ro vga=795
    initrd /kernel26.img
    I wonder why you have "default 1". If you want to boot Archlinux (above) as default you should use "default 0", or has something changed lately?
    Also:
    root=/dev/disk/by-uuid/blah(aka sda1)
    that doesn't seem to be very valid. You need to fill it in.
    /edit
    Ofcourse you used blah(aka sda1) just here, not in the real file... sorry for the unhelpfull post
    The default was a typo, as I could not boot into anything except the Arch CD I had to type it in manually. Although thanks for the reply anyways.
    kgas wrote:
    Hello fumbles, As you have a separate /boot partition, the grub entry is not correct, I believe. if  should be /boot/vmlinuz For more help this link may also help you.
    http://www.experts-exchange.com/Operati … 72531.html
    This is simply not true. The reverse however is. I did NOT have a seperate boot parition, ie boot was just in the root partition   then yes I would have to add /boot to the kernel and initrd lines.
    Last edited by fumbles (2009-01-08 04:32:07)

  • [SOLVED] GRUB 2 - "error: file not found" after Clonezilla Restore

    Hello,
    I backed up my Arch Install which is one root partition covering the entire SDD with Clonezilla, to play around with Gentoo and FreeBSD on my Laptop.
    Now I restored the image and when GRUB 2 loads I see "error: file not found" three times for a short momemt before I'm in the GRUB 2 menu.
    When I boot my I also see these 3 messages (probably the once from the early loading process) and "Loading Linux ck kernel...." "Loading initrafms...." "Press any key to continue..." When I wait for a short time or press enter it boots like expected (fsck message appears for a short time since I'm using quite boot and I'm in KDM after that).
    Grub loading...
    error: file not found
    error: file not found
    error: file not found
    Loading Linux ck kernel...
    Loading initramfs...
    Press any key to continue...
    I did not have this when I  backed it up. It booted into the menu and when I booted the menu entry it would go black to show me the fsck message and seconds later I was in KDM.
    I tried $ sudo grub-mkconfig but it did not change anything.
    This is my current /boot/grub/grub.cfg
    # DO NOT EDIT THIS FILE
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    insmod part_gpt
    insmod part_msdos
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    set default="0"
    if [ x"${feature_menuentry_id}" = xy ]; then
    menuentry_id_option="--id"
    else
    menuentry_id_option=""
    fi
    export menuentry_id_option
    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    function load_video {
    if [ x$feature_all_video_module = xy ]; then
    insmod all_video
    else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    fi
    if [ x$feature_default_font_path = xy ] ; then
    font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a93fa938-f74f-477d-9573-678340bb2940
    else
    search --no-floppy --fs-uuid --set=root a93fa938-f74f-477d-9573-678340bb2940
    fi
    font="/usr/share/grub/unicode.pf2"
    fi
    if loadfont $font ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    set locale_dir=$prefix/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_input console
    terminal_output gfxterm
    set timeout=5
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Arch GNU/Linux, with Linux ck kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-ck kernel-true-a93fa938-f74f-477d-9573-678340bb2940' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a93fa938-f74f-477d-9573-678340bb2940
    else
    search --no-floppy --fs-uuid --set=root a93fa938-f74f-477d-9573-678340bb2940
    fi
    echo 'Loading Linux ck kernel ...'
    linux /boot/vmlinuz-linux-ck root=/dev/sda1 elevator=noop ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-ck.img
    menuentry 'Arch GNU/Linux, with Linux ck kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-ck kernel-fallback-a93fa938-f74f-477d-9573-678340bb2940' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a93fa938-f74f-477d-9573-678340bb2940
    else
    search --no-floppy --fs-uuid --set=root a93fa938-f74f-477d-9573-678340bb2940
    fi
    echo 'Loading Linux ck kernel ...'
    linux /boot/vmlinuz-linux-ck root=/dev/sda1 elevator=noop ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-ck-fallback.img
    menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-a93fa938-f74f-477d-9573-678340bb2940' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a93fa938-f74f-477d-9573-678340bb2940
    else
    search --no-floppy --fs-uuid --set=root a93fa938-f74f-477d-9573-678340bb2940
    fi
    echo 'Loading Linux core repo kernel ...'
    linux /boot/vmlinuz-linux root=/dev/sda1 elevator=noop ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux.img
    menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-a93fa938-f74f-477d-9573-678340bb2940' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 a93fa938-f74f-477d-9573-678340bb2940
    else
    search --no-floppy --fs-uuid --set=root a93fa938-f74f-477d-9573-678340bb2940
    fi
    echo 'Loading Linux core repo kernel ...'
    linux /boot/vmlinuz-linux root=/dev/sda1 elevator=noop ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-fallback.img
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    ### END /etc/grub.d/20_memtest86+ ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    Anyone has a clue what files it is looking for? And why it doesn't boot straight away, when there is nothing that keeps it from booting up normal anyway?
    Last edited by blackout23 (2013-03-21 16:16:59)

    the.ridikulus.rat wrote:Upgrade to grub 2.00, that will give info on which file is actually missing. And then recreate /boot/grub/grub.cfg and check whether that error is gone.
    I think I'm already on Grub 2.0.0 otherwise I wouldn't have this cryptic menu configuration file.
    local/grub-bios 2.00-1
    GNU GRand Unified Bootloader - i386 PC BIOS Modules
    local/grub-common 2.00-1
    GNU GRand Unified Bootloader - Utilities and Common Files

  • [solved]URxvt and Xdefaults configurations not used

    Yesterday I noticed that my middle-mouse button paste from URxvt had stopped working, and today I noticed that seemingly all my configurations (besides fonts) aren't being used in URxvt.  If I run "source .Xdefaults" from a running URxvt, I get the error "no matches found: <option>".  This error is returned for the first line of the configuration, and the following settings were moved from the top to the bottom to see if any other configurations work:
    URxvt*perl-ext-common: default,matcher,clipboard
    URxvt*perl-ext: xim-onthespot
    urxvt*urlLauncher: /usr/bin/firefox
    urxvt*matcher.button: 1
    The only changes I can think of is adding the xim-onthespot line, the recent update to perl (however, since it occurs on non-perl lines as well, I'm not sure this is important), and the update to rxvt-unicode itself about 8 days ago (the problems could have been present thereafter, I just hadn't noticed).
    Has the syntax changed, or is there something blatantly obvious I overlooked?  I have also tried replacing the asterisk with a period (which results in a command not found error).  It seems to me that no one else has posted this problem here yet, but I may have missed it somewhere, and if so, a link would be nice.
    #urxvt*perl-lib: /usr/lib/urxvt/perl
    urxvt*termName: rxvt-unicode
    urxvt*internalBorder: 1
    urxvt*loginShell: true
    urxvt*background: rgba:0000/0000/0000/cccc
    urxvt*background: [70]#000000
    urxvt*foreground: white
    urxvt*transparent: 1
    urxvt*colorMode: on
    urxvt*cursorBlink: 0
    urxvt*depth: 32
    urxvt*color0: #000000
    urxvt*color1: #9e1828
    urxvt*color2: #aece92
    urxvt*color3: #968a38
    urxvt*color4: #414171
    urxvt*color5: #963c59
    urxvt*color6: #418179
    urxvt*color7: #bebebe
    urxvt*color8: #666666
    urxvt*color9: #cf6171
    urxvt*color10: #c5f779
    urxvt*color11: #fff796
    urxvt*color12: #4186be
    urxvt*color13: #cf9ebe
    urxvt*color14: #71bebe
    urxvt*color15: #ffffff
    urxvt*fading: 40
    #urxvt*tintColor: white
    urxvt*shading: 0
    urxvt*inheritPixmap: 0
    urxvt*scrollBar: 0
    urxvt*geometry: 81x22
    urxvt*saveLines:1000
    urxvt*font: xft:Inconsolata:pixelsize=12:antialias=true:hinting=true
    urxvt*boldFont: xft:Inconsolata:pixelsize=12:antialias=true:bold:hinting=true
    urxvt*italicFont: xft:Inconsolata:pixelsize=12:antialias=true:italic:autohint=true:hinting=true
    urxvt*bolditalicFont: xft:Inconsolata:pixelsize=12:antialias=true:bold:italic:autohint=true:hinting=true
    URxvt*preeditType: OnTheSpot,None
    URxvt*perl-ext-common: default,matcher,clipboard
    URxvt*perl-ext: xim-onthespot
    urxvt*urlLauncher: /usr/bin/firefox
    urxvt*matcher.button: 1
    Xcursor.theme: Vanilla-DMZ-AA
    Xcursor.size: 16
    Last edited by lswest (2010-08-12 00:28:29)

    lswest wrote:If I run "source .Xdefaults" from a running URxvt, I get the error "no matches found: <option>".
    "source" is a bash builtin to execute bash code in the context of the current shell session. The errors you get are due to the fact that it's actually bash trying to run the contents of your .Xdefaults as shell commands. To make changes to an Xdefaults file take effect, use
    xrdb -merge ~/.Xdefaults
    Changes to Xdefaults should take effect in any case if you restart X, though. Maybe there's something else amiss, but at least sourcing the file is definitely wrong.

  • [Solved] Systemd in user mode not working properly

    Hello.
    I wrote this Systemd service that I would like to run as normal user.
    [Unit]
    Description=Google Drive mount
    After=network-online.target
    Wants=network-online.target
    [Service]
    ExecStart=/usr/bin/google-drive-ocamlfuse -m '/home/egidio/Google Drive'
    ExecStop=/usr/bin/fusermount -u '/home/egidio/Google Drive'
    [Install]
    WantedBy=default.target
    I start it and everything seems fine, but when I try to access the mounted point, I get this error.
    [egidio@egidiolaptop user]$ ls -la ~/Google\ Drive
    ls: cannot access /home/egidio/Google Drive: Transport endpoint is not connected
    If I run the ExecStart command manually everything works perfectly.
    Can you please help me?
    Last edited by Aegidius (2015-05-13 18:17:12)

    This is the output of journalctl --all
    May 12 20:55:04 egidiolaptop /usr/lib/gdm/gdm-x-session[19552]: Activating service name='org.gnome.Terminal'
    May 12 20:55:04 egidiolaptop /usr/lib/gdm/gdm-x-session[19552]: Successfully activated service 'org.gnome.Terminal'
    May 12 20:55:26 egidiolaptop gnome-session[19563]: 1431456926458 addons.update-checker WARN Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property
    May 12 20:56:03 egidiolaptop systemd[19544]: [/home/egidio/.config/systemd/user/googledrive.service:2] Unknown lvalue 'Type' in section 'Unit'
    May 12 20:56:03 egidiolaptop systemd[19544]: Cannot add dependency job for unit network-online.target, ignoring: Unit network-online.target failed to load: No such file or directory.
    May 12 20:56:03 egidiolaptop systemd[19544]: Created slice -.slice.
    May 12 20:56:03 egidiolaptop systemd[19544]: Starting -.slice.
    May 12 20:56:03 egidiolaptop systemd[19544]: Started Google Drive mount.
    May 12 20:56:03 egidiolaptop systemd[19544]: Starting Google Drive mount...
    May 12 20:56:03 egidiolaptop fusermount[20547]: /usr/bin/fusermount: failed to unmount /home/egidio/Google Drive: Device or resource busy
    May 12 20:56:03 egidiolaptop systemd[19544]: googledrive.service: control process exited, code=exited status=1
    May 12 20:56:03 egidiolaptop systemd[19544]: Unit googledrive.service entered failed state.
    May 12 20:56:03 egidiolaptop systemd[19544]: googledrive.service failed.

  • [SOLVED] Quesiton about themes when NOT using a Desktop Environment

    I'm kind of lost as to what is being used as a "theme" for applications such as Firefox, when all I have installed is Openbox. I'm totally lost and just wanted to know how I could change it.
    Last edited by brandon88tube (2010-06-06 15:34:32)

    Firefox uses that gtk theme. You can chane it with tools like lxappearence and others that write a file that has configuration about the gtk theme.
    If you use Qt applications with qtconfig you can change the theme as well, normally there's a option to match the gtk theme.
    EDIT: Holly Cow , Wittfella answered almost exactly the same
    Last edited by Diaz (2010-06-06 03:14:55)

  • Moving Images Inside of Stack (not using context menu)

    I have not had success moving images around in an expanded stack using the drag-and-drop functionality of the mouse. When I do try to drag an image within the stack, I get an outline of an image but when I try to drop to a new location within the stack, nothing happens.
    Using the context menu to re-order a bunch of images is impractical.
    What am I doing wrong?

    I don't believe you are doing anything wrong. It appears the only thing you can do by mouse to a expanded stack, besides close it to the stack, is click the white box with the, i.e. [4 of 10] to make that image the top image.
    Don Ricklin, MacBook 1.83Ghz Duo Core, Pentax *ist D
    http://donricklin.blogspot.com/

  • [solved]installed chromium-no icon, not listed in menu

    I installed chromium and it works great. But it isn't listed in "applications>internet", in KDE. I can get to it through the search bar, and if I had an icon for it I'd set it on my desktop. Any way to make that happen?
    Last edited by pottzie (2010-06-15 19:27:41)

    Yes indeed there is, and it's now on my desk top. Thank you very much.

  • [SOLVED] Grub Problems Can boot Arch w/ grub edits only

    I had 3 Linux OS's installed on this computer, Arch and 2 versions of Ubuntu on one hard drive.
    The MBR belonged to Ubuntu, using grub2. I decided to get rid of the older Ubuntu (sda8 and 9) and add it's HDD space to my Arch home (sda12). Used the current Gparted live to modify the partitions and all went well, but of course, the numbers changed getting rid of 2 partitions.
    No boot upon restart so I decided to get Arch's grub back to the MBR with the new partition numbering scheme.
    Using a live CD, I used the grub shell, find /boot/grub/stage1.....etc, etc. and after a bit of fumbling, grub indicated success in the shell. When I was through though, a reboot was not successful, although the current stable grub was now written to the MBR.  I edited the lines using grub edit option, and got Arch to boot, and figured out the correct partition numbers. Next I edited the menu.lst to reflect the new sda numbers.
    Now rebooting results in a long delay when grub should be on the screen, and the numbers on the Arch entries reflect the old numbers still!! I double checked thinking I forgot to save the edits to the menu.lst file, but they are correct. I can boot Arch, but have to edit the lines each time.
    The current partitions are as follows. I edited the terminal output to show details.
    [jeff@Arch2009p2 ~]$ sudo fdisk -l
    Password:
    Disk /dev/sda: 750.2 GB, 750156374016 bytes
    255 heads, 63 sectors/track, 91201 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000383e7
    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 91201 732572001 5 Extended
    /dev/sda5 1 255 2048224+ 82 Linux swap / Solaris
    /dev/sda6 (ubuntu /) 256 1471 9767488+ 83 Linux
    /dev/sda7 (ubuntu /home) 1472 22321 167477593+ 83 Linux
    /dev/sda8 (arch boot) 22322 22325 32098+ 83 Linux
    /dev/sda9 (arch /) 22326 23627 10458283+ 83 Linux
    /dev/sda10 (arch /home) 23628 91201 542788123+ 83 Linux
    I have a few questions regarding a separate boot partition for Arch.
    Should the grub> root (hd0.0) command be directed to the root or boot partition.
    My handy printed emergency guide says: Set grubs root device to the partition containing the boot directory.
    OK.....Writing it out now, it seems clear, so I'll try reinstalling grub from a live CD.
    Why does grub have incorrect partition numbers even though the menu.lst is correct?
    There are only 2 OS's on this box now, and one contains grub2.
    Is current grub able to interact with grub 2 if I screwed something up on the install?
    Last edited by jeff story (2010-05-24 20:05:06)

    OK
    I managed to fix the problem of grub not reading/using the menu.lst file. Not sure WTF it was reading and where that file was located!
    The problem seems to have been the most insignificant detail.
    When using the grub terminal, I did not execute the quit command when I was through. I just closed the terminal and rebooted.
    After repeating the following code via live CD a few times:
    $ sudo grub
    grub> find /grub/stage1
    grub> root (hd0,7)
    grub> setup (hd0)
    Grub still didn't read the current menu.lst.
    This morning I got things to work correctly and grub to read the current menu.lst by adding a quit command and returning to the linux shell prior to rebooting.
    I used the following commands:
    $ sudo grub
    grub> find /grub/stage1
    grub> root (hd0,7)
    grub> setup (hd0)
    grub> quit

  • [Solved] Grub errors 18 and 22 when booting from SSD

    Hello community,
    recently I purchased an SSD drive and am now having trouble doing an Arch install on it. Before that a 2TB HDD was in use. After building in the SSD I partitioned it (msdos partition table) creating partitions for swap, / and /home. Then I copied the files from the old /home partition on the freshly created one and installed Arch on the new / partition. Here's the partition setup:
    $ LANG=C sudo fdisk -l
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0003a234
    Device Boot Start End Blocks Id System
    /dev/sda1 2048 3907028991 1953513472 5 Extended
    /dev/sda5 16065 4192964 2088450 82 Linux swap / Solaris
    /dev/sda6 4196352 65720319 30761984 83 Linux # old /
    /dev/sda7 65722368 577720319 255998976 83 Linux # old /home
    /dev/sda8 577722368 3907028991 1664653312 83 Linux
    Disk /dev/sdb: 128.0 GB, 128035676160 bytes
    255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000a9841
    Device Boot Start End Blocks Id System
    /dev/sdb1 51863552 241582079 94859264 83 Linux # new /home
    /dev/sdb2 241582080 250068991 4243456 82 Linux swap / Solaris
    /dev/sdb3 2048 51863551 25930752 83 Linux # new /
    Partition table entries are not in disk order
    The problem is: booting from the SSD fails as follows: On the first try to select some Grub entry I get an error 22 "No such partition.". On any further try I get error 18 "Selected cylinder exceeds maximum supported by bios".
    What works is  to boot up the new system from the Grub residing on the HDD. So the problem is just the new Grub install in the SSD's MBR. Also it's not a thing of Grub's configuration, since copying the working menu.lst from the HDD install and reinstalling grub via grub-install /dev/sdb gives the correct Grub entries but selecting them results in the same errors.
    So currently I'm booting from the HDD and selecting the boot entry for the freshly installed SSD system there, which works fine. But of course I'd like the SSD to be able to boot without "help" on the part of the HDD.
    I tried to activate AHCI in the Bios but it didn't make any difference. The SSD is a Crucial M4 128GB.
    Thanks for any hints,
    PhotonX
    Last edited by PhotonX (2012-07-26 06:04:53)

    I created a /boot partition now:
    $ LANG=C sudo fdisk -l
    Disk /dev/sdb: 128.0 GB, 128035676160 bytes
    255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000a9841
    Device Boot Start End Blocks Id System
    /dev/sdb1 51863552 241582079 94859264 83 Linux # /home
    /dev/sdb2 241582080 249831423 4124672 82 Linux swap / Solaris
    /dev/sdb3 2048 51863551 25930752 83 Linux # /
    /dev/sdb4 * 249831424 250068991 118784 83 Linux # /boot
    Partition table entries are not in disk order
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
    255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0003a234
    Device Boot Start End Blocks Id System
    /dev/sda1 2048 3907028991 1953513472 5 Extended
    /dev/sda5 16065 4192964 2088450 82 Linux swap / Solaris
    /dev/sda6 4196352 65720319 30761984 83 Linux
    /dev/sda7 65722368 577720319 255998976 83 Linux
    /dev/sda8 577722368 3907028991 1664653312 83 Linux
    Then installed Grub on this partition: "grub-install /dev/sdb4". Then placed the SSD on the first position in the Bios, booted but got the same errors in Grub. So it doesn't matter where exactly Grub is installed, if it's somewhere on the SSD, it fails...
    edit: Concerning using UUIDs: I couldn't find any howto regarding Grub (legacy) configuration with UUID's. Could you point me to some example config?
    edit2: I now put the SSD on the first place in the boot list and started PartedMagic. But fdisk still recognizes the SSD as sdb and the HDD as sda. I think, the sdX identifier can be changed only by plugging the SSD in the first SATA port and the HDD in the second (while now it is the other way around).
    edit3: I tried to install Grub from the HDD installation on the SSD (executed "grub-install /dev/sdb4" from the HDD system) and found out that, though I created a /boot partition on the SSD, the Grub files installed directly on /dev/sdb are used. So I tried to install Grub from the HDD system onto /dev/sdb (executed "grub-install /dev/sdb" from the HDD system) and got error 22 even before Grub's boot list was shown. But maybe it's really a bad idea to install Grub on another drive than the system it belongs to is located.
    Last edited by PhotonX (2012-05-18 21:54:56)

  • Grub menu.lst generator

    Hello archlinux fans,
    is there a script or something else, that generates a "good" grub menu.lst ?
    thx
    ogu

    Here's the update-grub script from Debian's grub package - does what you're looking for.
    #!/bin/sh
    # Insert a list of installed kernels in a grub menu.lst file
    # Copyright 2001 Wichert Akkerman <[email protected]>
    # This file is free software; you can redistribute it and/or modify it
    # under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or
    # (at your option) any later version.
    # This program is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    # Contributors:
    # Jason Thomas <[email protected]>
    # David B.Harris <[email protected]>
    # Marc Haber <[email protected]>
    # Crispin Flowerday <[email protected]>
    # Abort on errors
    set -e
    abort() {
    message=$@
    echo >&2
    echo -e "$message" >&2
    echo >&2
    exit 1
    find_grub_dir ()
    echo -n "Searching for GRUB installation directory ... " >&2
    for d in $grub_dirs ; do
    if [ -d "$d" ] ; then
    grub_dir="$d"
    break
    fi
    done
    if [ -z "$grub_dir" ] ; then
    abort "No GRUB directory found.n To create a template run 'mkdir /boot/grub' first.n To install grub, install it manually or try the 'grub-install'
    command.n ### Warning, grub-install is used to change your MBR. ###"
    else
    echo "found: $grub_dir ." >&2
    fi
    echo $grub_dir
    find_device ()
    mount_point=$1
    # Autodetect current root device
    device=
    if [ -f /etc/fstab ] ; then
    script='
    /^#/ { next }
    $2 == "'"$mount_point"'" { print $1 ; exit }
    device=`awk "$script" /etc/fstab`
    fi
    if [ -n "$device" ] ; then
    case "$device" in
    LABEL=* | UUID=*)
    device=`readlink -f "$(findfs $device)"`
    device=`readlink -f "$device"`
    esac
    fi
    echo $device
    find_root_device ()
    device=$(find_device "/")
    if [ -z "$device" ]; then
    echo "$PROG: Cannot determine root device. Assuming /dev/hda1" >&2
    echo "This error is probably caused by an invalid /etc/fstab" >&2
    device=/dev/hda1
    fi
    echo $device
    # Usage: convert os_device
    # Convert an OS device to the corresponding GRUB drive.
    # This part is OS-specific.
    convert () {
    # First, check if the device file exists.
    if test -e "$1"; then
    else
    echo "$1: Not found or not a block device." 1>&2
    exit 1
    fi
    host_os=`uname -s | tr '[A-Z]' '[a-z]'`
    # Break the device name into the disk part and the partition part.
    case "$host_os" in
    linux)
    tmp_disk=`echo "$1" | sed -e 's%([sh]d[a-z])[0-9]*$%1%'
    -e 's%(fd[0-9]*)$%1%'
    -e 's%/part[0-9]*$%/disc%'
    -e 's%(c[0-7]d[0-9]*).*$%1%'`
    tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]([0-9]*)$%1%'
    -e 's%.*/fd[0-9]*$%%'
    -e 's%.*/floppy/[0-9]*$%%'
    -e 's%.*/(disc|part([0-9]*))$%2%'
    -e 's%.*c[0-7]d[0-9]*p*%%'`
    gnu)
    tmp_disk=`echo "$1" | sed 's%([sh]d[0-9]*).*%1%'`
    tmp_part=`echo "$1" | sed "s%$tmp_disk%%"` ;;
    freebsd|*/kfreebsd)
    tmp_disk=`echo "$1" | sed 's%r{0,1}([saw]d[0-9]*).*$%r1%'
    | sed 's%r{0,1}(da[0-9]*).*$%r1%'`
    tmp_part=`echo "$1"
    | sed "s%.*/r{0,1}[saw]d[0-9](s[0-9]*[a-h])%1%"
    | sed "s%.*/r{0,1}da[0-9](s[0-9]*[a-h])%1%"`
    netbsd|*/knetbsd)
    tmp_disk=`echo "$1" | sed 's%r{0,1}([sw]d[0-9]*).*$%r1d%'
    | sed 's%r{0,1}(fd[0-9]*).*$%r1a%'`
    tmp_part=`echo "$1"
    | sed "s%.*/r{0,1}[sw]d[0-9]([abe-p])%1%"`
    echo "update-grub does not support your OS yet." 1>&2
    exit 1 ;;
    esac
    # Get the drive name.
    tmp_drive=`grep -v '^#' $device_map | grep "$tmp_disk *$"
    | sed 's%.*(([hf]d[0-9][a-g0-9,]*)).*%1%'`
    # If not found, print an error message and exit.
    if test "x$tmp_drive" = x; then
    echo "$1 does not have any corresponding BIOS drive." 1>&2
    exit 1
    fi
    if test "x$tmp_part" != x; then
    # If a partition is specified, we need to translate it into the
    # GRUB's syntax.
    case "$host_os" in
    linux)
    echo "$tmp_drive" | sed "s%)$%,`expr $tmp_part - 1`)%" ;;
    gnu)
    if echo $tmp_part | grep "^s" >/dev/null; then
    tmp_pc_slice=`echo $tmp_part
    | sed "s%s([0-9]*)[a-g]*$%1%"`
    tmp_drive=`echo "$tmp_drive"
    | sed "s%)%,`expr "$tmp_pc_slice" - 1`)%"`
    fi
    if echo $tmp_part | grep "[a-g]$" >/dev/null; then
    tmp_bsd_partition=`echo "$tmp_part"
    | sed "s%[^a-g]*([a-g])$%1%"`
    tmp_drive=`echo "$tmp_drive"
    | sed "s%)%,$tmp_bsd_partition)%"`
    fi
    echo "$tmp_drive" ;;
    freebsd|*/kfreebsd)
    if echo $tmp_part | grep "^s" >/dev/null; then
    tmp_pc_slice=`echo $tmp_part
    | sed "s%s([0-9]*)[a-h]*$%1%"`
    tmp_drive=`echo "$tmp_drive"
    | sed "s%)%,`expr "$tmp_pc_slice" - 1`)%"`
    fi
    if echo $tmp_part | grep "[a-h]$" >/dev/null; then
    tmp_bsd_partition=`echo "$tmp_part"
    | sed "s%s{0,1}[0-9]*([a-h])$%1%"`
    tmp_drive=`echo "$tmp_drive"
    | sed "s%)%,$tmp_bsd_partition)%"`
    fi
    echo "$tmp_drive" ;;
    netbsd|*/knetbsd)
    if echo $tmp_part | grep "^[abe-p]$" >/dev/null; then
    tmp_bsd_partition=`echo "$tmp_part"
    | sed "s%([a-p])$%1%"`
    tmp_drive=`echo "$tmp_drive"
    | sed "s%)%,$tmp_bsd_partition)%"`
    fi
    echo "$tmp_drive" ;;
    esac
    else
    # If no partition is specified, just print the drive name.
    echo "$tmp_drive"
    fi
    # Usage: convert_default os_device
    # Convert an OS device to the corresponding GRUB drive.
    # Calls OS-specific convert, and returns a default of
    # (hd0,0) if anything goes wrong
    convert_default () {
    if tmp=$(convert $1 2>/dev/null) ; then
    echo $tmp
    else
    echo "(hd0,0)"
    fi
    ## Configuration Options
    # directory's to look for the grub installation and the menu file
    grub_dirs="/boot/grub /boot/boot/grub"
    # The grub installation directory
    grub_dir=$(find_grub_dir)
    # Full path to the menu.lst
    menu_file=$grub_dir/menu.lst
    # the device for the / filesystem
    root_device=$(find_root_device)
    # the device for the /boot filesystem
    boot_device=$(find_device "/boot")
    # Full path to the device.map
    device_map=$grub_dir/device.map
    # Default kernel options, overidden by the kopt statement in the menufile.
    kopt="root=$root_device ro"
    # Drive(in GRUB terms) where the kernel is located. Overridden by the
    # kopt statement in menufile.
    # if we don't have a device.map then we can't use the convert function.
    if test -f "$device_map" ; then
    if test -z "$boot_device" ; then
    grub_root_device=$(convert_default "$root_device")
    else
    grub_root_device=$(convert_default "$boot_device")
    fi
    else
    grub_root_device="(hd0,0)"
    fi
    # should grub create the alternative boot options in the menu
    alternative="true"
    # should grub lock the alternative boot options in the menu
    lockalternative="false"
    # options to use with the alternative boot options
    altoptions="(recovery mode) single"
    # controls howmany kernels are listed in the menu.lst,
    # this does not include the alternative kernels
    howmany="all"
    # should grub create a memtest86 entry
    memtest86="true"
    # stores the command line arguments
    command_line_arguments=$1
    # Default options to use in a new menu.lst . This will only be used if menu.lst
    # doesn't already exist. Only edit the lines between the two "EOF"s. The others are
    # part of the script.
    newtemplate=$(tempfile)
    cat > "$newtemplate" <<EOF
    # 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-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'.
    default 0
    ## 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
    EOF
    ## End Configuration Options
    # Make sure we use the standard sorting order
    LC_COLLATE=C
    # Magic markers we use
    start="### BEGIN AUTOMAGIC KERNELS LIST"
    end="### END DEBIAN AUTOMAGIC KERNELS LIST"
    startopt="## ## Start Default Options ##"
    endopt="## ## End Default Options ##"
    # Extract options from menu.lst
    ExtractMenuOpt()
    opt=$1
    sed -ne "/^$start$/,/^$end$/ {
    /^$startopt$/,/^$endopt$/ {
    /^# $opt=/ {
    s/^# $opt=(.*)$/1/
    p
    }" $menu
    GetMenuOpts()
    opt=$1
    sed -ne "/^$start$/,/^$end$/ {
    /^$startopt$/,/^$endopt$/ {
    /^# $opt=/ {
    p
    }" $menu
    ExtractMenuOpts()
    opt=$1
    GetMenuOpts $opt | sed "s/^# $opt=(.*)$/1="4"/"
    GetMenuOpt()
    opt=$1
    value=$2
    tmp=$(ExtractMenuOpt "$opt")
    [ -z "$tmp" ] || value="$tmp"
    echo $value
    # Compares two version strings A and B
    # Returns -1 if A<B
    # 0 if A==B
    # 1 if A>B
    # This compares version numbers of the form
    # 2.4.14-random > 2.4.14-ac10 > 2.4.14 > 2.4.14-pre2 >
    # 2.4.14-pre1 > 2.4.13-ac99
    CompareVersions()
    # First split the version number and remove any '.' 's or dashes
    v1=$(echo $1 | sed -e 's![-.]+! !g' -e 's![.-]!!g')
    v2=$(echo $2 | sed -e 's![-.]+! !g' -e 's![.-]!!g')
    if echo $v1 | grep -q "smp"; then
    v1smp=1
    else
    v1smp=0
    fi
    if echo $v2 | grep -q "smp"; then
    v2smp=1
    else
    v2smp=0
    fi
    v1words=$(echo $v1 | wc -w)
    v2words=$(echo $v2 | wc -w)
    # we weight different kernel suffixes here
    # ac = 50
    # pre = -50
    # rc = -40
    # test = -60
    # others are given 99
    v1=$(echo $v1 | sed -e 's! k7! 786 !g' -e 's! ac! 50 !g' -e 's! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !g' -e 's![^-0-9 ]+!99!g')
    v2=$(echo $v2 | sed -e 's! k7! 786 !g' -e 's! ac! 50 !g' -e 's! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !g' -e 's![^-0-9 ]+!99!g')
    # this code only works if you stay only with kernel-image kernels.
    if ( [ ! $v1words -eq 6 ] && [ $v1smp -eq 0 ] ) || ( [ ! $v1words -eq 7 ] && [ $v1smp -eq 1 ] ); then
    v1=$(echo $v1| cut -d" " -f1-4)" 0 "$(echo $v1| cut -d" " -f5-)
    fi
    if ( [ ! $v2words -eq 6 ] && [ $v2smp -eq 0 ] ) || ( [ ! $v2words -eq 7 ] && [ $v2smp -eq 1 ] ); then
    v2=$(echo $v2| cut -d" " -f1-4)" 0 "$(echo $v2| cut -d" " -f5-)
    fi
    result=0; v1finished=0; v2finished=0;
    while [ $result -eq 0 ] && [ $v1finished -eq 0 ] && [ $v2finished -eq 0 ];
    do
    if [ "$v1" = "" ]; then
    v1comp=0; v1finished=1
    else
    set -- $v1; v1comp=$1; shift; v1=$*
    fi
    if [ "$v2" = "" ]; then
    v2comp=0; v2finished=1
    else
    set -- $v2; v2comp=$1; shift; v2=$*
    fi
    if [ $v1comp -gt $v2comp ]; then result=1
    elif [ $v1comp -lt $v2comp ]; then result=-1
    fi
    done
    # finally return the result
    echo $result
    # looks in the directory specified for an initrd image with the version specified
    FindInitrdName()
    # strip trailing slashes
    directory=$(echo $1 | sed -e 's#/*$##')
    version=$2
    # initrd
    # initrd.img
    # initrd-lvm
    # .*.gz
    initrdName=""
    names="initrd initrd.img initrd-lvm"
    compressed="gz"
    for n in $names ; do
    # make sure we haven't already found it
    if [ -z "$initrdName" ] ; then
    if [ -f "$directory/$n$version" ] ; then
    initrdName="$n$version"
    break
    else
    for c in $compressed ; do
    if [ -f "$directory/$n$version.$c" ] ; then
    initrdName="$n$version.$c"
    break
    fi
    done
    fi
    else
    break
    fi
    done
    # return the result
    echo $initrdName
    get_kernel_opt()
    kernel_version=$1
    version=$(echo $kernel_version | sed 's/[^0-9]*([0-9]+).([0-9]+).([0-9]+).*/1_2_3/')
    if [ -n "$version" ] ; then
    while [ -n "$version" ] ; do
    currentOpt="$(eval "echo $kopt_$version")"
    if [ -n "$currentOpt" ] ; then
    break
    fi
    version=$(echo $version | sed 's/_?[0-9]*$//')
    done
    fi
    if [ -z "$currentOpt" ] ; then
    currentOpt=$kopt
    fi
    echo $currentOpt
    write_kernel_entry()
    kernel_version=$1
    recovery_desc=$2
    lock_alternative=$3
    grub_root_device=$4
    kernel=$5
    kernel_options=$6
    recovery_suffix=$7
    initrd=$8
    echo "title Debian GNU/Linux, kernel $kernel_version $recovery_desc" >> $buffer
    # lock the alternative options
    if test x"$lock_alternative" = x"true" ; then
    echo "lock" >> $buffer
    fi
    echo "root $grub_root_device" >> $buffer
    echo "kernel $kernel $kernel_options $recovery_suffix" >> $buffer
    if [ -n "$initrd" ]; then
    echo "initrd $initrd" >> $buffer
    fi
    echo "savedefault" >> $buffer
    echo "boot" >> $buffer
    echo >> $buffer
    echo -n "Testing for an existing GRUB menu.list file... "
    # Test if our menu file exists
    if [ -f "$menu_file" ] ; then
    menu="$menu_file"
    unset newtemplate
    echo "found: $menu_file ."
    cp -f "$menu_file" "$menu_file~"
    else
    # if not ask user if they want us to create one
    menu="$menu_file"
    echo
    echo
    echo -n "Could not find $menu_file file. "
    if [ "-y" = "$command_line_arguments" ] ; then
    echo
    echo "Generating $menu_file"
    answer=y
    else
    echo -n "Would you like $menu_file generated for you? "
    echo -n "(y/N) "
    read answer
    fi
    case "$answer" in
    y* | Y*)
    cat "$newtemplate" > $menu_file
    unset newtemplate
    abort "Not creating $menu_file as you wish"
    esac
    fi
    # Extract the kernel options to use
    kopt=$(GetMenuOpt "kopt" "$kopt")
    # Extract options for specific kernels
    eval $(ExtractMenuOpts "(kopt_[0-9](_[0-9]{1,2}(_[0-9]{1,2})?)?)")
    CustomKopts=$(GetMenuOpts "(kopt_[0-9](_[0-9]{1,2}(_[0-9]{1,2})?)?)")
    # Extract the grub root
    grub_root_device=$(GetMenuOpt "groot" "$grub_root_device")
    # Extract the old recovery value
    alternative=$(GetMenuOpt "recovery" "$alternative")
    # Extract the alternative value
    alternative=$(GetMenuOpt "alternative" "$alternative")
    # Extract the lockalternative value
    lockalternative=$(GetMenuOpt "lockalternative" "$lockalternative")
    # Extract the howmany value
    howmany=$(GetMenuOpt "howmany" "$howmany")
    # Extract the memtest86 value
    memtest86=$(GetMenuOpt "memtest86" "$memtest86")
    # Generate the menu options we want to insert
    buffer=$(tempfile)
    echo $start >> $buffer
    echo "## lines between the AUTOMAGIC KERNELS LIST markers will be modified" >> $buffer
    echo "## by the debian update-grub script except for the default optons below" >> $buffer
    echo >> $buffer
    echo "## DO NOT UNCOMMENT THEM, Just edit them to your needs" >> $buffer
    echo >> $buffer
    echo "## ## Start Default Options ##" >> $buffer
    echo "## default kernel options" >> $buffer
    echo "## default kernel options for automagic boot options" >> $buffer
    echo "## If you want special options for specifiv kernels use kopt_x_y_z" >> $buffer
    echo "## where x.y.z is kernel version. Minor versions can be omitted." >> $buffer
    echo "## e.g. kopt=root=/dev/hda1 ro" >> $buffer
    echo "# kopt=$kopt" >> $buffer
    if [ -n "$CustomKopts" ] ; then
    echo "$CustomKopts" >> $buffer
    fi
    echo >> $buffer
    echo "## default grub root device" >> $buffer
    echo "## e.g. groot=(hd0,0)" >> $buffer
    echo "# groot=$grub_root_device" >> $buffer
    echo >> $buffer
    echo "## should update-grub create alternative automagic boot options" >> $buffer
    echo "## e.g. alternative=true" >> $buffer
    echo "## alternative=false" >> $buffer
    echo "# alternative=$alternative" >> $buffer
    echo >> $buffer
    echo "## should update-grub lock alternative automagic boot options" >> $buffer
    echo "## e.g. lockalternative=true" >> $buffer
    echo "## lockalternative=false" >> $buffer
    echo "# lockalternative=$lockalternative" >> $buffer
    echo >> $buffer
    echo "## altoption boot targets option" >> $buffer
    echo "## multiple altoptions lines are allowed" >> $buffer
    echo "## e.g. altoptions=(extra menu suffix) extra boot options" >> $buffer
    echo "## altoptions=(recovery mode) single" >> $buffer
    if ! grep -q "^# altoptions" $menu ; then
    echo "# altoptions=$altoptions" >> $buffer
    else
    grep "^# altoptions" $menu >> $buffer
    fi
    echo >> $buffer
    echo "## controls how many kernels should be put into the menu.lst" >> $buffer
    echo "## only counts the first occurence of a kernel, not the" >> $buffer
    echo "## alternative kernel options" >> $buffer
    echo "## e.g. howmany=all" >> $buffer
    echo "## howmany=7" >> $buffer
    echo "# howmany=$howmany" >> $buffer
    echo >> $buffer
    echo "## should update-grub create memtest86 boot option" >> $buffer
    echo "## e.g. memtest86=true" >> $buffer
    echo "## memtest86=false" >> $buffer
    echo "# memtest86=$memtest86" >> $buffer
    echo >> $buffer
    echo "## ## End Default Options ##" >> $buffer
    echo >> $buffer
    echo -n "Searching for splash image... "
    if [ -f /boot/grub/splash.xpm.gz ]; then
    echo "found: /boot/grub/splash.xpm.gz ."
    echo "splashimage=${grub_root_device}${grub_dir}/splash.xpm.gz" >> $buffer
    echo >> $buffer
    else
    echo "none found, skipping..."
    fi
    sortedKernels=""
    for kern in $(/bin/ls -1vr /boot/vmlinuz-* | grep -v dpkg-*) ; do
    # found a kernel
    newerKernels=""
    for i in $sortedKernels ; do
    res=$(CompareVersions "$kern" "$i")
    if [ "$kern" != "" ] && [ "$res" -gt 0 ] ; then
    newerKernels="$newerKernels $kern $i"
    kern=""
    else
    newerKernels="$newerKernels $i"
    fi
    done
    if [ "$kern" != "" ] ; then
    newerKernels="$newerKernels $kern"
    fi
    sortedKernels="$newerKernels"
    done
    if test -f "/boot/vmlinuz.old" ; then
    sortedKernels="/boot/vmlinuz.old $sortedKernels"
    fi
    if test -f "/boot/vmlinuz" ; then
    sortedKernels="/boot/vmlinuz $sortedKernels"
    fi
    # figure out where grub looks for the kernels at boot time
    kernel_dir=/boot
    if [ -n "$boot_device" ] ; then
    kernel_dir=
    fi
    ## heres where we start writing out the kernel entries
    counter=0
    for kern in $sortedKernels ; do
    counter=$(($counter + 1))
    if test ! x"$howmany" = x"all" ; then
    if [ $counter -gt $howmany ] ; then
    break
    fi
    fi
    kernelName=$(basename $kern)
    kernelVersion=$(echo $kernelName | sed -e 's/vmlinuz//')
    initrdName=$(FindInitrdName "/boot" "$kernelVersion")
    initrd=""
    kernel=$kernel_dir/$kernelName
    if [ -n "$initrdName" ] ; then
    initrd=$kernel_dir/$initrdName
    fi
    echo "Found kernel: $kernel"
    if [ "$kernelName" = "vmlinuz" ]; then
    if [ -L "/boot/$kernelName" ]; then
    kernelVersion=`readlink -f "/boot/$kernelName"`
    kernelVersion=$(echo $kernelVersion | sed -e 's/.*vmlinuz-//')
    kernelVersion="$kernelVersion Default"
    else
    kernelVersion="Default"
    fi
    fi
    if [ "$kernelName" = "vmlinuz.old" ]; then
    if [ -L "/boot/$kernelName" ]; then
    kernelVersion=`readlink -f "/boot/$kernelName"`
    kernelVersion=$(echo $kernelVersion | sed -e 's/.*vmlinuz-//')
    kernelVersion="$kernelVersion Previous"
    else
    kernelVersion="Previous"
    fi
    fi
    kernelVersion=$(echo $kernelVersion | sed -e 's/^-//')
    currentOpt=$(get_kernel_opt $kernelVersion)
    write_kernel_entry "$kernelVersion" "" "" "$grub_root_device" "$kernel"
    "$currentOpt" "" "$initrd"
    # insert the alternative boot options
    if test ! x"$alternative" = x"false" ; then
    # for each altoptions line do this stuff
    sed -ne 's/# altoptions=(.*)/1/p' $buffer | while read line; do
    descr=$(echo $line | sed -ne 's/(([^)]*))[[:space:]](.*)/1/p')
    suffix=$(echo $line | sed -ne 's/(([^)]*))[[:space:]](.*)/2/p')
    write_kernel_entry "$kernelVersion" "$descr" "$lockalternative"
    "$grub_root_device" "$kernel" "$currentOpt" "$suffix" "$initrd"
    done
    fi
    done
    memtest86names="memtest86 memtest86+"
    if test ! x"$memtest86" = x"false" ; then
    for name in $memtest86names ; do
    if test -f "/boot/$name.bin" ; then
    kernelVersion="$name"
    kernel="$kernel_dir/$name.bin"
    currentOpt=
    initrd=
    echo "Found kernel: $kernel"
    write_kernel_entry "$kernelVersion" "" "" "$grub_root_device"
    "$kernel" "$currentOpt" "" "$initrd"
    fi
    done
    fi
    echo $end >> $buffer
    echo -n "Updating $menu ... "
    # Insert the new options into the menu
    if ! grep -q "^$start" $menu ; then
    cat $buffer >> $menu
    else
    umask 077
    sed -e "/^$start/,/^$end/{
    /^$start/r $buffer
    d
    " $menu > $menu.new
    cat $menu.new > $menu
    rm -f $buffer $menu.new
    fi
    echo "done"
    echo

  • Preference panes do not open from menu bar extras

    Hello.
    I have an annoying problem : the preference panes in system preferences work well but the shortcuts to open them from the menu bar extras do not.
    For example, when I choose "open bluetooth preferences" in the bluetooth menu bar extra, nothing happens.
    But I can ver y well get to the bluetooth preferences in system preferences.
    Same goes for all Apple or non-Apple menu bar extras which give the option of accessing a system prenerences pane : bluetooth, MenuMeters, Salling Clicker, Apple 's battery meter, Date &Time (those are the ones I use).
    I tried removing the menu extras and re- enabling them, repaired permissions, checked permissions on the menu extras (with Applecare), re-ran the 10.4.5 combo update ... with no effect.
    I think this started after I used Onyx (what a bad idea ...) for "regular" maintenance.
    This is just annoying. Applecare tells me to archive and install.
    I'd love to have a less invasive solution : except this annoying problem, my Mac works perfectly. And "archive and install" is quite time consuming since it is not that innocent with Apple or 3rd party pro apps.
    I remember I had a similar issue with my old Mac by the times of Puma or Jaguar. There was an easier solution than "archive and install" by that time.
    If anyone has any idea, I would really appreciate it.
    Thanks in advance,
    Jérôme.

    The first thing to do is to remove any third party products that use the menu bar. Apple has advised developers from the day OS X came out to not use the menu bar for anything. They made it off limits for whatever reasons they have.
    Of course some developers came up with hacks so that they could use it. Many of us, including me, like them but sometimes they cause problems. That is why I suggest starting there. Remove them and then re check your disk permissions and also run disk utility on your drive to insure that you don't have other issues.
    This may not solve the problem but it is a good place to start.

  • I turned off remembering passwords, but not in the menu. i altered some setting (maybe registry? i want to turn it back on.

    first. i do NOT use norton. i am a web developer and some time ago i ran into a problem displaying my pages in firefox/mozilla when i would update them. i cant remember exactly what the problem was, but i did a google search and found a way to disable it. it was NOT using the menu interface button (tools/options/security) as this is grey.
    i want to turn this back to default. thanks for any help. i dont want to uninstall mozilla and reinstall if possible.

    i upgraded. then i tried that. did not work. if you read my question you will see that the option under tools/options/security to save passwords was GREYED OUT. it still is.
    this setting was modified by editing a file the program uses. i seem to remember changing a number from 3 to 1 (not sure of the numbers. seemed like there was a range of 5 to 1, and 1 was to never remember anything.
    does this ring a bell? thanks again for any help.

  • [Solved] Grub not displaying menu, error messages from grub-mkconfig

    Hi I'm new
    I have (or rather, am trying to setup) a dual boot with Windows 8.1 and Arch, with each OS on separate SSDs.
    Windows 8.1 already installed, Arch installation (seems to have) has gone smoothly. However, when I remove the installation usb, and try to boot, I get a command line prompt:
    grub >_
    ...instead of a menu. I tried typing 'boot', but got 'you need to load the kernel first'. So I cannot access my arch installation without chrooting (or knowing how to compile the kernel in the command line, which I could not find after a lot of searching)
    I followed the documentation in the Beginner's Guide and the GRUB page for installing and configuring GRUB. This is UEFI (grub2), not BIOS (grub legacy).
    pacman -S grub efibootmgr
    grub-install --target=x86S64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
    No error messages. I also installed os-prober for kicks. When I went to generate the config file (as recommended for beginners), I got a torrent of what I interpreted to be error messages, not just copacetic output:
    grub-mkconfig -o /boot/grub/grub.cfg
    resulted in:
    click this link for error messages
    (sorry about the image. I had to shutdown and reboot into my windows partition, since I still can't arch it up. If any/all of you have a better way to reproduce output and feel it pertinent, I'm all ears)
    so upon exiting chroot and rebooting, grub boots up to the above effect; no menu is displayed. And I am sad panda.
    Background Information:
    Partition scheme:
    /dev/sda1 - BIOS boot partition (I didn't read carefully, lol)
    /dev/sda2 - EFI System Partition - mounted to /mnt/boot when chrooting in
    /dev/sda3 - Root partition - mounted to /mnt/ when chrooting in
    /dev/sda4 - Home partition - mounted to /mnt/home when chrooting in
    The installation and configuration described above was done in chroot with the above partition scheme
    I originally had issues booting into UEFI mode with the arch iso (written to a usb stick for the initial install). The boot would hang at 'triggering uevents'. I ultimately fixed this by pressing 'e' in the bootloader menu (also grub, I believe) and prepended
    linux /boot/vmlinux-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff nomodeset nouveau.modeset=0
    It then (successfully triggered uevents? and) booted normally
    ALSO:
    This is a custom built pc.
    Hardware:
    intel i7 4930K
    ASUS Sabertooth X79 mobo
    ASUS GTX 780 Ti gpu
    ballistix sport DDR3 RAM (4 x 8 GB)
    3 x 128 GB SSD (ADATA P900)
    1 x 2 TB HDD (Toshiba, 7200 rpm)
    Hey, if you made it to the bottom of this post, I really appreciate you taking the time out of your day. Thank you!
    Last edited by Otsdarva (2014-06-09 03:22:25)

    I realized that since I was not using EFISTUB, I could not mount the ESP to /boot; it had to be /boot/efi. A quick remount-reinstall of grub, then rerunning grub-mkconfig solved the issue.
    Also, regarding WonderWoofy's suggestion: I learned by trying gummiboot that for whatever reason the kernel hadn't compiled properly when I ran
    pacstrap /mnt base base-devel
    Fixed via
    pacman -S linux
    Thanks for your help, everybody!

  • My Macbook Pro purchased Dec 2011 has suddenly become very slow after not using for 2 weeks (close to frozen). What is the problem and how to solve it?

    My Macbook Pro purchased Dec 2011 has suddenly become very slow after not using for 2 weeks (close to frozen). What is the problem and how to solve it?

    Need Help Ye,
    boot your MacBook Pro into Recovery mode by holding down a Command key and the R key as it starts up. Once the Mac OS X Utilities menu appears, select Disk Utility. On the left-hand side of the Disk Utility window, select your internal disk’s boot partition (typically called “Macintosh HD”). On the right-hand side, press the Verify Disk button if it’s not greyed out; if it is greyed out, or if it reports that errors were found, press the Repair Disk button. Once the verification/repair is completed, exit Disk Utility and select Restart from the Apple menu to restart in normal mode. Is it still very slow?

Maybe you are looking for