Page 31 of 103 FirstFirst ... 2129303132334181 ... LastLast
Results 301 to 310 of 1028

Thread: How to install Grub from a live Ubuntu cd.

  1. #301
    Join Date
    Oct 2007
    Beans
    2

    Re: How to install Grub from a live Ubuntu cd.

    another thing to consider is multiple drives. Make sure your boot drive is the drive with Grub on the MBR as it can be on multiple drives...

  2. #302
    Join Date
    May 2007
    Location
    Ontario
    Beans
    428
    Distro
    Ubuntu

    Re: How to install Grub from a live Ubuntu cd.

    I just installed Windows XP which overrides the Grub loader and MBR. I want Grub back. So I am using the initial post in this thread as a guide. I get stuck, however:
    Code:
    grub> find /boot/grub/stage1
     (hd0,5)
    
    grub> root (hd0,5)
    
    grub> setup (hd0,5)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
     Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
     Running "install /boot/grub/stage1 (hd0,5) /boot/grub/stage2 p /boot/grub/menu
    .lst "... failed
    
    Error 12: Invalid device requested
    
    grub>
    What does this mean? Does this mean my sda ubuntu partition isn't loaded? I tried mounting it as the intial poster recommended but I failed. Here are the commands I tried:
    Code:
    ubuntu@ubuntu:~$ sudo grub
    Probing devices to guess BIOS drives. This may take a long time.
    ubuntu@ubuntu:~$ sudo mkdir /ubuntu
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda
    sda   sda1  sda2  sda3  sda4  sda5  sda6  sda7  
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda2 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda2,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ dmesg | tail
    [  121.332000] Bluetooth: L2CAP ver 2.8
    [  121.332000] Bluetooth: L2CAP socket layer initialized
    [  121.368000] Bluetooth: RFCOMM socket layer initialized
    [  121.368000] Bluetooth: RFCOMM TTY layer initialized
    [  121.368000] Bluetooth: RFCOMM ver 1.8
    [  123.864000] NET: Registered protocol family 17
    [  132.592000] NET: Registered protocol family 10
    [  132.592000] lo: Disabled Privacy Extensions
    [  142.596000] eth0: no IPv6 routers present
    [ 1618.584000] ReiserFS: sda2: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda2
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda3 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda3,
           missing codepage or helper program, or other error
           (aren't you trying to mount an extended partition,
           instead of some logical partition inside?)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda5 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda5,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ dmesg | tail
    [  142.596000] eth0: no IPv6 routers present
    [ 1618.584000] ReiserFS: sda2: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda2
    [ 1669.936000] attempt to access beyond end of device
    [ 1669.936000] sda3: rw=0, want=18, limit=2
    [ 1669.936000] ReiserFS: sda3: warning: sh-2006: read_super_block: bread failed (dev sda3, block 8, size 1024)
    [ 1669.936000] attempt to access beyond end of device
    [ 1669.936000] sda3: rw=0, want=130, limit=2
    [ 1669.936000] ReiserFS: sda3: warning: sh-2006: read_super_block: bread failed (dev sda3, block 64, size 1024)
    [ 1669.936000] ReiserFS: sda3: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda3
    [ 1680.216000] ReiserFS: sda5: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda5
    ubuntu@ubuntu:~$ gedit /etc/fstab 
    ubuntu@ubuntu:~$
    Oh yeah, these are the contents of my fstab:
    Code:
    unionfs / unionfs rw 0 0
    tmpfs /tmp tmpfs nosuid,nodev 0 0
    /dev/sda6 swap swap defaults 0 0
    Last edited by Drone4four; April 24th, 2008 at 01:50 AM. Reason: fstab

  3. #303
    Join Date
    Dec 2005
    Location
    N.C.
    Beans
    4,796
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to install Grub from a live Ubuntu cd.

    If you want to install grub to the mbr, then "setup (hd0)"..."setup (hd0,5)" installs grub to the root partition.

    (hd0,5) is the way grub recognizes /dev/sda6...if your root partition is indeed reiserfs, then:
    Code:
    sudo mount -t reiserfs /dev/sda6 /ubuntu
    or if its ext3:
    Code:
    sudo mount -t ext3 /dev/sda6 /ubuntu
    The fstab you've posted is from the live cd, not from your installed Ubuntu. If you're able to mount your root partition, this will show your fstab:
    Code:
    gedit /ubuntu/etc/fstab

  4. #304
    Join Date
    Jun 2007
    Location
    Melbourne, Australia
    Beans
    1,171

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by Drone4four View Post
    I just installed Windows XP which overrides the Grub loader and MBR. I want Grub back. So I am using the initial post in this thread as a guide. I get stuck, however:
    Code:
    grub> find /boot/grub/stage1
     (hd0,5)
    
    grub> root (hd0,5)
    
    grub> setup (hd0,5)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
     Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
     Running "install /boot/grub/stage1 (hd0,5) /boot/grub/stage2 p /boot/grub/menu
    .lst "... failed
    
    Error 12: Invalid device requested
    
    grub>
    What does this mean? Does this mean my sda ubuntu partition isn't loaded? I tried mounting it as the intial poster recommended but I failed. Here are the commands I tried:
    Code:
    ubuntu@ubuntu:~$ sudo grub
    Probing devices to guess BIOS drives. This may take a long time.
    ubuntu@ubuntu:~$ sudo mkdir /ubuntu
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda
    sda   sda1  sda2  sda3  sda4  sda5  sda6  sda7  
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda2 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda2,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ dmesg | tail
    [  121.332000] Bluetooth: L2CAP ver 2.8
    [  121.332000] Bluetooth: L2CAP socket layer initialized
    [  121.368000] Bluetooth: RFCOMM socket layer initialized
    [  121.368000] Bluetooth: RFCOMM TTY layer initialized
    [  121.368000] Bluetooth: RFCOMM ver 1.8
    [  123.864000] NET: Registered protocol family 17
    [  132.592000] NET: Registered protocol family 10
    [  132.592000] lo: Disabled Privacy Extensions
    [  142.596000] eth0: no IPv6 routers present
    [ 1618.584000] ReiserFS: sda2: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda2
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda3 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda3,
           missing codepage or helper program, or other error
           (aren't you trying to mount an extended partition,
           instead of some logical partition inside?)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ sudo mount -t reiserfs /dev/sda5 /ubuntu
    mount: wrong fs type, bad option, bad superblock on /dev/sda5,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    ubuntu@ubuntu:~$ dmesg | tail
    [  142.596000] eth0: no IPv6 routers present
    [ 1618.584000] ReiserFS: sda2: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda2
    [ 1669.936000] attempt to access beyond end of device
    [ 1669.936000] sda3: rw=0, want=18, limit=2
    [ 1669.936000] ReiserFS: sda3: warning: sh-2006: read_super_block: bread failed (dev sda3, block 8, size 1024)
    [ 1669.936000] attempt to access beyond end of device
    [ 1669.936000] sda3: rw=0, want=130, limit=2
    [ 1669.936000] ReiserFS: sda3: warning: sh-2006: read_super_block: bread failed (dev sda3, block 64, size 1024)
    [ 1669.936000] ReiserFS: sda3: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda3
    [ 1680.216000] ReiserFS: sda5: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda5
    ubuntu@ubuntu:~$ gedit /etc/fstab 
    ubuntu@ubuntu:~$
    Oh yeah, these are the contents of my fstab:
    Code:
    unionfs / unionfs rw 0 0
    tmpfs /tmp tmpfs nosuid,nodev 0 0
    /dev/sda6 swap swap defaults 0 0

    You don't want to setup (hd0,5) unless you want to install grub only to that partition, which doesn't really make much sense. It should just be
    Code:
    sudo grub
    root (hd0,5)
    setup (hd0)
    exit

  5. #305
    Join Date
    May 2007
    Location
    Ontario
    Beans
    428
    Distro
    Ubuntu

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by jw5801 View Post
    You don't want to setup (hd0,5) unless you want to install grub only to that partition, which doesn't really make much sense. It should just be
    Code:
    sudo grub
    root (hd0,5)
    setup (hd0)
    exit
    setup (hd0) doesn't work either:
    Code:
    grub> root (hd0,5)
    
    grub> setup (hd0)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,5)/boot/grub/stage2
    /boot/grub/menu.lst"... failed
    
    Error 12: Invalid device requested
    
    grub>

  6. #306
    Join Date
    May 2007
    Location
    Ontario
    Beans
    428
    Distro
    Ubuntu

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by confused57 View Post
    If you want to install grub to the mbr, then "setup (hd0)"..."setup (hd0,5)" installs grub to the root partition.

    (hd0,5) is the way grub recognizes /dev/sda6...if your root partition is indeed reiserfs, then:
    Code:
    sudo mount -t reiserfs /dev/sda6 /ubuntu
    or if its ext3:
    Code:
    sudo mount -t ext3 /dev/sda6 /ubuntu
    The fstab you've posted is from the live cd, not from your installed Ubuntu. If you're able to mount your root partition, this will show your fstab:
    Code:
    gedit /ubuntu/etc/fstab
    I changed the dir from /ubuntu to /u666 (don't ask):
    Code:
    ubuntu@ubuntu:/$ sudo mount -t reiserfs /dev/sda6 /u666
    mount: /dev/sda6 already mounted or /u666 busy
    ubuntu@ubuntu:/$ sudo mount /dev/sda6 /ubuntu6
    /dev/sda6 looks like swapspace - not mounted
    mount: you must specify the filesystem type

  7. #307
    Join Date
    May 2007
    Location
    Ontario
    Beans
    428
    Distro
    Ubuntu

    Re: How to install Grub from a live Ubuntu cd.

    btw, just in case, here is some more essential information:
    Code:
    ubuntu@ubuntu:/$ cd / && ls
    bin  boot  cdrom  dev  etc  home  initrd  initrd.img  lib  media  mnt  opt  proc  rofs  root  sbin  srv  sys  tmp  u666  ubuntu  ubuntu2  ubuntu3  ubuntu6  usr  var  vmlinuz
    The contents of mtab:
    Code:
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
    udev /dev tmpfs rw,mode=0755 0 0
    devpts /dev/pts devpts rw,gid=5,mode=620 0 0
    tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
    And finally:
    Code:
    ubuntu@ubuntu:/$ lsof | grep /ubuntu
    lsof: WARNING: can't stat() tmpfs file system /cow
          Output information may be incomplete.
    bash       7322     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bash       7323     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bash       7324     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bash       7325     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bash       7326     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bash       7327     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    x-session  9196     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    gnome-key  9238     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    metacity   9248     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    metacity   9248     ubuntu  mem       REG       0,18          26522 /cow/home/ubuntu/.fontconfig/e13b20fdb08344e0e664864cc2ede53d-x86.cache-2 (stat: No such file or directory)
    gnome-pan  9252     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    nautilus   9255     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    nautilus   9255     ubuntu  mem       REG       0,18          26522 /cow/home/ubuntu/.fontconfig/e13b20fdb08344e0e664864cc2ede53d-x86.cache-2 (stat: No such file or directory)
    vino-sess  9278     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    bluetooth  9281     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    update-no  9285     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    evolution  9291     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    python     9296     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    nm-applet  9298     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    fast-user  9380     ubuntu  mem       REG       0,18          26522 /cow/home/ubuntu/.fontconfig/e13b20fdb08344e0e664864cc2ede53d-x86.cache-2 (stat: No such file or directory)
    deskbar-a  9382     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    mixer_app  9384     ubuntu  mem       REG       0,18          26522 /cow/home/ubuntu/.fontconfig/e13b20fdb08344e0e664864cc2ede53d-x86.cache-2 (stat: No such file or directory)
    firefox    9392     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    run-mozil  9404     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    firefox-b  9408     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    firefox-b  9408     ubuntu  mem       REG       0,18          26522 /cow/home/ubuntu/.fontconfig/e13b20fdb08344e0e664864cc2ede53d-x86.cache-2 (stat: No such file or directory)
    firefox-b  9408     ubuntu    4wW     REG       0,19       0   9344 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/.parentlock
    firefox-b  9408     ubuntu   10wW     REG       0,19       0   9344 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/.parentlock
    firefox-b  9408     ubuntu   21u      REG       0,19 1977344   9483 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/urlclassifier2.sqlite
    firefox-b  9408     ubuntu   34u      REG       0,19    2048   9463 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/search.sqlite
    firefox-b  9408     ubuntu   36u      REG       0,19   18656   9475 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/history.dat
    firefox-b  9408     ubuntu   39u      REG       0,19   65536   9445 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/cert8.db
    firefox-b  9408     ubuntu   40u      REG       0,19   16384   9446 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/key3.db
    firefox-b  9408     ubuntu   41u      REG       0,19    2048   9463 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/search.sqlite
    firefox-b  9408     ubuntu   42u      REG       0,19     276   9471 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/Cache/_CACHE_MAP_
    firefox-b  9408     ubuntu   43u      REG       0,19 1779712   9472 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/Cache/_CACHE_001_
    firefox-b  9408     ubuntu   44u      REG       0,19  621568   9473 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/Cache/_CACHE_002_
    firefox-b  9408     ubuntu   45u      REG       0,19  897024   9474 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/Cache/_CACHE_003_
    firefox-b  9408     ubuntu   46u      REG       0,19     227   9501 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/formhistory.dat
    firefox-b  9408     ubuntu   48u      REG       0,19 1977344   9483 /home/ubuntu/.mozilla/firefox/uztqt7bt.default/urlclassifier2.sqlite
    xchat-gno  9693     ubuntu  cwd       DIR       0,19     820    267 /home/ubuntu
    ubuntu@ubuntu:/$ lsof | grep u666
    lsof: WARNING: can't stat() tmpfs file system /cow
          Output information may be incomplete.
    ubuntu@ubuntu:/$

  8. #308
    Join Date
    Dec 2005
    Location
    N.C.
    Beans
    4,796
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to install Grub from a live Ubuntu cd.

    You might want to post the output of:
    Code:
    sudo fdisk -l
    -l is a lowercase "L"

  9. #309
    Join Date
    May 2007
    Location
    Ontario
    Beans
    428
    Distro
    Ubuntu

    Re: How to install Grub from a live Ubuntu cd.

    Yes! fdisk was the command I was looking for:
    Code:
    ubuntu@ubuntu:/$ sudo fdisk -l
    omitting empty partition (5)
    
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0574c76c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1          41      329301   83  Linux
    /dev/sda2   *          42        5013    39937590    7  HPFS/NTFS
    /dev/sda3            5014       38913   272301750    f  W95 Ext'd (LBA)
    /dev/sda4           10242       15348    41021946   83  Linux
    /dev/sda5            5014       10241    41993847   83  Linux
    /dev/sda6           15349       15603     2048256   82  Linux swap / Solaris
    /dev/sda7           15604       38913   187237543+   b  W95 FAT32

  10. #310
    Join Date
    Dec 2005
    Location
    N.C.
    Beans
    4,796
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to install Grub from a live Ubuntu cd.

    You may want to use Grub's CLI to investigate your computer:
    http://users.bigpond.net.au/hermanzone/p15.htm#cli

    Is /dev/sda1 a separate /boot partition & your root partition sda4 or sda5?

Page 31 of 103 FirstFirst ... 2129303132334181 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •