Stargate Logo  Secured by phpPhobos

Smurphtools   
  Login  - No Account?  Create One   
Search 
Wednesday, 20 November 2019  -
News FeedRSS Feed
rss rdf  
  Home 
  Authentication 
 Documentation 
    Site Documentation 
    About me 
  Legal Notice 
 Applications 
    Web Links 
 RC Models 
    RC Models 
    RC Batteries 
 Modules 
    Downloads 
    Weblinks 
 Blacklists 
    Blacklist 
    Blockout 
    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 ]
 Router
  > Gateway 
 Server
  > Stargate 
  > Halley 
 Client
  > RemPi 
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.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"
 \ ... succeeded
Done.

grub>quit
[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: 76555

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+