Stargate Logo  Secured by phpPhobos

Shadow Family   
  Login  - No Account?  Create One   
Thursday, 28 January 2021  -
News FeedRSS Feed
rss rdf  
    Site Documentation 
    About me 
  Legal Notice 
    Web Links 
    RC Models 
    RC Batteries 
    Build blogs 
    DNS Blacklist 
 Registered Bloggers 
  Blog de Maiwenn 
  Blog de Morgane 
  Joerg's Blog 
 Gallery [Listing]
  > Diving 
  > Martinique 
  > Steampunk 
  > RC Planes 
  > FPV Drones 
  > Indy travels 
  > Budapest 
 FAQ  [ Topics  ]
 Common Linux problem... 
 Routerboard RBxxxAH 
 Apple Mac-mini 
 PHP Phobos 
 Stargate's Backup sc... 
 eBook Reader / PRS-5... 
 RC Models 
 Server in SolLan 
 System Stats [ Index ]
  > Gateway 
  > Stargate 
  > Halley 
  > RemPi 
 Weather Station
  > WeatherPI 
Question ? How to reinstall grub from a rescue mode ?   [
View DetailsView details
Print ViewPrint view

 Boot into a ubuntu "try" mode or whatever linux system that provides you the possibility to manipulate the harddisk.
You first need to prepare the environment

root@ubuntu:~# mkdir /sda
root@ubuntu:~# mount /dev/sda3 /sda    # this is the / of the existing system
root@ubuntu:~# mount -o bind /dev /sda/dev
root@ubuntu:~# mount -o bind /proc /sda/proc
root@ubuntu:~# chroot /sda /bin/bash
[root@ubuntu /]# mount /dev/sda1 /boot

Then - Install GRUB

[root@ubuntu /]# grub

    GNU GRUB  version 0.95  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]

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)"...  16 sectors are embedded.
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"
 \ ... succeeded

[root@ubuntu /]#

After that - undo whatever you have done in reverse order

[root@ubuntu /]# umount /boot
[root@ubuntu /]# exit
root@ubuntu:~# umount /sda/proc
root@ubuntu:~# umount /sda/dev
root@ubuntu:~# umount /dev/sda3

If you reboot - you should see a grub prompt as usual. 

Entered by smurphy on Friday, 15 October 2010 @ 11:25:36  
Linux General - Common Linux problems, # Hits: 82045

Next  How can I boot from the SATA drive 2 of a Software Raid-1 System ? 
  Back Back  
Problems to  root(-AT-)solsys(-DOT-)org  - best viewed @ 1920bpp
This site is powered by phpPhobos v2.0b446
© J. Mertin smurphy(-AT-)solsys(-DOT-)org 
Icons - Copyright Breeze artists GPL 2+