topic title: grub help
Posts: 73
zpimp
Joined: 20 Jan 2014
#1
so i wanted to clone antix partition to another hdd
after my tests (partclone,fsarchiver), fastest way would be to rsync files WHILE THE SYSTEM IS RUNNING installed on hdd, and thats what i did
i followed
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.archlinux.org/index.php/Full_system_backup_with_rsync"
linktext was:"https://wiki.archlinux.org/index.php/Fu ... with_rsync"
====================================

i just use the rsync command after mounting sdb1 all was fine
didnt change fstab and grub menu cause i wont be running both hdd at the same time, basically want to use the 2nd hdd in another pc

1).now the tricky part wich i dont understand, although i have read alot, how to install grub from the running system (installed to 1st hdd)
i understand i need to grub-install to second hdd cause rsync moves the grub stage2 and so just dd the mbr is not enough
i followed this
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://ubuntuforums.org/showthread.php?t=1692144"
linktext was:"http://ubuntuforums.org/showthread.php?t=1692144"
====================================


2).after this didnt work i tried to do it from grub prompt but it seems i cant find it
what is the path of the grub console program

i just want to understand, im reading for 2 days now __{{emoticon}}__
i like it cause im learning, but now im stuck __{{emoticon}}__

edit:
after following this
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://crunchbang.org/forums/viewtopic.php?id=15351"
linktext was:"http://crunchbang.org/forums/viewtopic.php?id=15351"
====================================

it got to the grub menu but didnt work searching btfrs filesystem or something
i only did grub-install cause i read grub-update overwrites the config file
Posts: 73
zpimp
Joined: 20 Jan 2014
#2
this seems to get over my head
when i boot antix the menu says grub2
but grub-repair says grub-legacy, so wich grub is antix using? grub2 or grub legacy

tried a couple more times copying rsync
from live cd, imounted sda1,sdb1,rsync, mounted proc dev sys, chroot, grub install , grub update, i get grub-rescue
if i use grub repair with both hdd, i can repair 1st
but second hdd (connected alone, says cant find uuid, isnt uuid software-type id??)

i have a feeling is something simple that anyone knows, but me __{{emoticon}}__
anyway will keep asking in other places too
also what does grub-repair gui do ? i assum it executes some commands
Posts: 8
paraquat
Joined: 13 Sep 2011
#3
Hi zpimp,

> this seems to get over my head
> when i boot antix the menu says grub2
> but grub-repair says grub-legacy, so wich grub is antix using? grub2 or grub legacy

I'm not an expert, but I do know that antix 15 uses grub2...something I hate. It was so much easier to recover back in the days of grub-legacy. In fact, my"solution" to these types of problems is to have a small partition where I install Puppy Linux (which uses grub-legacy) installed, even though I don't use Puppy as my main workhorse distro. About 99% of what I do is with antix, so I keep the Puppy CD handy for when I have an issue with grub - I boot it and reinstall, and let it setup grub-legacy in the mbr, and everything seems to work.

Not sure if that's the solution you want to hear though.

Another interesting option for grub2 haters would be syslinux:


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.syslinux.org/wiki/index.php/SYSLINUX"
linktext was:"http://www.syslinux.org/wiki/index.php/SYSLINUX"
====================================


I wish that was an option on antix at install time.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#4
I keep a live iso which has bailed me out on grub2 mbr installs that I personally borked on my own.
It has not failed me yet. Even with dual booters like Windows 8 and such.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://sourceforge.net/projects/boot-repair-cd/"
linktext was:"http://sourceforge.net/projects/boot-repair-cd/"
====================================


It is a permanent cd now in the cd rack along side


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.supergrubdisk.org/rescatux/"
linktext was:"http://www.supergrubdisk.org/rescatux/"
====================================


and


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.hirensbootcd.org/"
linktext was:"http://www.hirensbootcd.org/"
====================================


The 1st link I posted is a no brainer to run to repair a grub install on a mbr.
Posts: 73
zpimp
Joined: 20 Jan 2014
#5
i have finally nailed it
all tutorials i found were right, i was wrong at grub-install
everywhere it said grub-install /dev/sda

and i thought when chroot-ed /dev/sdb becomes /dev/sda
it seems grub-install to second hdd is still /dev/sdb even if you are chrooted
so if i understand this, correct me if im wrong grub-install /dev/sdb can be run outside chroot cause it deals with mbr of devices not filesystem
only update-grub needs to be run in chroot cause it deals with /boot/grub/grub.cfg and other setting wich reside on the filesystem

so after mounting & rsync, mount dev/proc/sys, chroot, grub-install /dev/sdb, update-grub, umount /dev/proc/sys,
and finally after copy hdd partition uuid from /media/sdb1/boot/grub/grub.cfg and replace in your /media/sdb1 / e t c / f s t a b

i managed to copy ~4gb in <2min
best part, it works from installed system too, no need for livecd

as a side note, i f*cked up a little and installed grub to sda1 too __{{emoticon}}__ if anyone has any idea how to remove ...

is amazing to me how configurable and modular linux is
Posts: 11
Stripey
Joined: 31 Dec 2015
#6
Hi zpimp!

There are many options to do what you ask.

The best advice is to relax and enjoy yourself. This can be fun. Overcome that sinking feeling. You can make that go away.

Tip: your question is not clear enough or specific enough to get a simple"do this" answer, besides there are many answers __{{emoticon}}__
I'll try to give a few simple routes.


1. You might try adding an entry to boot to the new (cloned) hdd from existing drive (ie edit entry to tempoarily give you access to new device).
Press"c" at the gub menu then issue grub commands... select the new disc and away you go.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://members.iinet.net/~herman546/p20/GRUB2%20How%20To%20Boot%20From%20CLI%20Mode.html"
linktext was:"http://members.iinet.net/~herman546/p20 ... 0Mode.html"
====================================


Once booted to that OS redo grub-install or maybe do grub-update. That should let you fix the new disc.


2. You can also boot the new hdd in the new system (computer) from a boot disc or usb thumbdrive.
Once into new/cloned OS proceed to install grub2.

System rescue cd can boot to new system:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.sysresccd.org/Download"
linktext was:"http://www.sysresccd.org/Download"
====================================


Use the option to boot hdd, not to load resue OS on iso. Press F1, F2, etc... to see options.
(Maybe different -- haven't used it in years.)


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.sysresccd.org/Online-Manual-EN"
linktext was:"http://www.sysresccd.org/Online-Manual-EN"
====================================


... or try one of these:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://lifehacker.com/5984707/five-best-system-rescue-discs"
linktext was:"http://lifehacker.com/5984707/five-best ... scue-discs"
====================================

See the knoppix screenshot shows such an option.


3. You can also boot from the antiX iso on usb (or installed with antiX2grub) or cd and install/fix grub2 this way.

The best way for you depends on you preference and toolset.

Happy hacking! You are soon an expert.


More reading for you:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://ixquick.com/do/search?q=cloned%20hd+install%20grub2"
linktext was:"https://ixquick.com/do/search?q=cloned% ... ll%20grub2"
====================================

Maybe this helps, too?