Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:grub2_from_grub1 [2011/05/03 04:29] – Forum link correction bernhard | wiki:grub2_from_grub1 [2012/10/14 19:02] (current) – [Partition naming using LABEL=] remove stale image aus9 | ||
---|---|---|---|
Line 5: | Line 5: | ||
This wiki assumes you are migrating from grub-legacy to grub2, which is a completely different bootloader. | This wiki assumes you are migrating from grub-legacy to grub2, which is a completely different bootloader. | ||
- | TRY AT OWN RISK. It would be nice if you know how to use a live cd if you find you have any issues. I suggest you try out first in a virtual machine, then onto an USB stick. | + | TRY IT AT YOUR OWN RISK. It would be nice if you know how to use a live cd if you find you have any issues. I suggest you try it out first in a virtual machine, then onto a USB stick. |
Line 14: | Line 14: | ||
< | < | ||
- | If found, | + | If found, |
Checking your MBR. This is OPTIONAL. Although there are ways of checking using qemu....I have not used qemu for years so prefer a quicker test. | Checking your MBR. This is OPTIONAL. Although there are ways of checking using qemu....I have not used qemu for years so prefer a quicker test. | ||
Line 26: | Line 26: | ||
Legacy MBR may look like this | Legacy MBR may look like this | ||
- | {{http://stashbox.org/ | + | < |
+ | root@box:~# sudo dd if=/dev/sda bs=512 count=1 | strings | ||
+ | ZRiI | ||
+ | D|f1 | ||
+ | GRUB | ||
+ | Geom | ||
+ | Hard Disk | ||
+ | Read | ||
+ | | ||
+ | 1+0 records in | ||
+ | 1+0 records out | ||
+ | </ | ||
while grub2 in MBR may look like this | while grub2 in MBR may look like this | ||
- | {{http://stashbox.org/943426/ | + | < |
+ | root@box:~# sudo dd if=/dev/sda bs=512 count=1 | strings | ||
+ | ZRi= | ||
+ | '|f1 | ||
+ | \|f1 | ||
+ | GRUB | ||
+ | Geom | ||
+ | Hard Disk | ||
+ | Read | ||
+ | | ||
+ | 1+0 records in | ||
+ | 1+0 records out | ||
+ | </code> | ||
TIP....If you have TWO x f(s) you have grub2 | TIP....If you have TWO x f(s) you have grub2 | ||
- | Leaping ahead, when you install any grub2 package, use cpanel | + | Leaping ahead, when you install any grub2 package, use cPanel |
Line 41: | Line 62: | ||
===== Part one ===== | ===== Part one ===== | ||
- | As grub2 depends on grep, replacing busybox grep, my /bin/true command now works. Please read this carefully. | + | As grub2 depends on grep, replacing busybox grep, my /bin/true command now works. Please read this carefully. |
Firstly your MBR remains grub-legacy. | Firstly your MBR remains grub-legacy. | ||
- | Secondly I suggest you use the cpanel | + | Secondly I suggest you use the cPanel |
Then click your menu to ondemand install grub2.tcz into the ram system. Or install grub2 if you prefer it the traditional way. | Then click your menu to ondemand install grub2.tcz into the ram system. Or install grub2 if you prefer it the traditional way. | ||
- | |||
- | {{http:// | ||
As no installer scripts were activated by your install or ondemand activity, we have more to do. | As no installer scripts were activated by your install or ondemand activity, we have more to do. | ||
We manually install grub2 packages into your grub folder...adjust for your persistent tce directory please. | We manually install grub2 packages into your grub folder...adjust for your persistent tce directory please. | ||
- | < | + | < |
- | TIP I prefer you copy and paste from web browser to your terminal...and adjust for your persistent partition if needed......to avoid typos please. | + | TIP I prefer you copy and paste from web browser to your terminal...and adjust |
The references link explains, this tricks grub2 into thinking by the bin/true switch....that it is actually installed in MBR when it is NOT! | The references link explains, this tricks grub2 into thinking by the bin/true switch....that it is actually installed in MBR when it is NOT! | ||
Line 78: | Line 97: | ||
I show a basic grub-legacy menu.lst | I show a basic grub-legacy menu.lst | ||
- | {{http://stashbox.org/945214/zz-menucore.jpeg}} | + | < |
+ | title Tiny Core 3 | ||
+ | kernel | ||
+ | initrd / | ||
+ | |||
+ | title grub2 core | ||
+ | kernel | ||
+ | </ | ||
If you wish to test wallpaper or locale, you can install those packages or install OnDemand as well. | If you wish to test wallpaper or locale, you can install those packages or install OnDemand as well. | ||
Line 84: | Line 111: | ||
If grub legacy menu successfully jumps to the grub2 menu....and successfully boots for you, then you can install grub2 into MBR if you like it. | If grub legacy menu successfully jumps to the grub2 menu....and successfully boots for you, then you can install grub2 into MBR if you like it. | ||
- | |||
- | |||
- | |||
====== | ====== | ||
Line 95: | Line 119: | ||
< | < | ||
- | |||
- | {{http:// | ||
Please note that TC is different from " | Please note that TC is different from " | ||
Line 129: | Line 151: | ||
If you elected to have persistent home and opt, you may reduce some files in the backup as per forum suggestions. | If you elected to have persistent home and opt, you may reduce some files in the backup as per forum suggestions. | ||
- | |||
- | {{http:// | ||
A cut down grub.cfg without any wallpaper becomes | A cut down grub.cfg without any wallpaper becomes | ||
Line 329: | Line 349: | ||
On reboot you may get this, if you have no wallpaper found. Image may differ from current grub.cfg | On reboot you may get this, if you have no wallpaper found. Image may differ from current grub.cfg | ||
- | |||
- | {{http:// | ||
If we upgrade our kernel and use different version numbers, my config file will not update unless you modify it manually. Alternatively, | If we upgrade our kernel and use different version numbers, my config file will not update unless you modify it manually. Alternatively, | ||
Line 383: | Line 401: | ||
Change hda1 to your target partition if applicable please. | Change hda1 to your target partition if applicable please. | ||
- | |||
- | {{http:// | ||
If you like labels, check that all of your new menuentries boot correctly, before deleting any /dev style entries. | If you like labels, check that all of your new menuentries boot correctly, before deleting any /dev style entries. | ||
Line 404: | Line 420: | ||
I have removed other cheatcodes to focus your mind on the label versus dev entry. | I have removed other cheatcodes to focus your mind on the label versus dev entry. | ||
- | |||
- | |||
- | |||
- | |||
===== Settings not recommended in your grub.cfg | ===== Settings not recommended in your grub.cfg | ||
Line 420: | Line 432: | ||
hiddenmenu ......arch wiki says you need to hold the shift key to UN-hide it, which IMHO is non-intuitive. | hiddenmenu ......arch wiki says you need to hold the shift key to UN-hide it, which IMHO is non-intuitive. | ||
- | |||
- | |||
====== | ====== | ||
Line 509: | Line 519: | ||
vbetest | vbetest | ||
- | {{http:// | ||
When you press enter the second time....vbetest will test your graphics are bit harder...then press enter again to end the test. | When you press enter the second time....vbetest will test your graphics are bit harder...then press enter again to end the test. | ||
Line 517: | Line 526: | ||
< | < | ||
grub > vbeinfo </ | grub > vbeinfo </ | ||
- | |||
- | {{http:// | ||
- | |||
- | {{http:// | ||
- | |||
- | {{http:// | ||
These are virtualbox shots...my monitor can actually do bigger resolutions...(optional) that is for you to find out for yours. | These are virtualbox shots...my monitor can actually do bigger resolutions...(optional) that is for you to find out for yours. | ||
Line 537: | Line 540: | ||
Basically background images and displayed counting 0,0 as top left hand corner of your monitor. | Basically background images and displayed counting 0,0 as top left hand corner of your monitor. | ||
- | If you like mtpaint here is a quick guide to how to resize.....Open the image with mtpaint.....Pulldown Image.....Click on "scale canvas" | + | If you like mtpaint here is a quick guide to how to resize.....Open the image with mtpaint.....Pulldown Image.....Click on "scale canvas" |
- | + | ||
- | {{http:// | + | |
Ideally we set the image canvas to the same vbemode (gfxmode)....but kernel font is a different matter. | Ideally we set the image canvas to the same vbemode (gfxmode)....but kernel font is a different matter. | ||
- | |||
- | Lets look at this image using gfxmode=1024x768x24..in vbox. (Menuentry is an older version of grub.cfg) | ||
- | |||
- | {{http:// | ||
The bigger the canvas size...the smaller the menuentry font size appears to be. Lets change that now. | The bigger the canvas size...the smaller the menuentry font size appears to be. Lets change that now. | ||
Line 558: | Line 555: | ||
ImageMagick can also use a command to resize canvas and color depth. So then use a graphics application to resize canvas to the same gfxmode and depth. | ImageMagick can also use a command to resize canvas and color depth. So then use a graphics application to resize canvas to the same gfxmode and depth. | ||
- | |||
- | {{http:// | ||
The above image still needs tweaking....we could go back to 640x480 especially if you need to E (for) EDIT and can't read the size of fonts. | The above image still needs tweaking....we could go back to 640x480 especially if you need to E (for) EDIT and can't read the size of fonts. | ||
Line 618: | Line 613: | ||
http:// | http:// | ||
- | |||
- | |||
- | |||
- | |||
- | |||
====== | ====== | ||
Line 632: | Line 622: | ||
You may find yourself at the grub prompt...with no menu. You can use commands to boot your TC. | You may find yourself at the grub prompt...with no menu. You can use commands to boot your TC. | ||
- | |||
- | {{http:// | ||
The key differences | The key differences | ||
Line 648: | Line 636: | ||
simple...ls returns drives detected and partitions detected. | simple...ls returns drives detected and partitions detected. | ||
- | |||
- | {{http:// | ||
If you can't remember a special kernel cheatcode...try cat command to view your existing config file | If you can't remember a special kernel cheatcode...try cat command to view your existing config file | ||
Note that I have pressed the TAB key....which also works for grub-legacy to " | Note that I have pressed the TAB key....which also works for grub-legacy to " | ||
- | |||
- | {{http:// | ||
Also, grub2 should detect the correct number of available drives and show that the normal module is loaded. Normal.mod is the basic module that helps to give you the text menu. | Also, grub2 should detect the correct number of available drives and show that the normal module is loaded. Normal.mod is the basic module that helps to give you the text menu. | ||
- | |||
- | {{http:// | ||
The bottom of above image shows....using the " | The bottom of above image shows....using the " | ||
- | |||
- | {{http:// | ||
In above image I have used the TAB key to search for files beginning with gr. But in this test case....I deliberately made an typo instead of copying and pasting the command from the install section that lead to me having grub.cfg1 instead of grub.cfg1. | In above image I have used the TAB key to search for files beginning with gr. But in this test case....I deliberately made an typo instead of copying and pasting the command from the install section that lead to me having grub.cfg1 instead of grub.cfg1. | ||
Line 671: | Line 651: | ||
According to arch wiki, you may have a module not correctly installed...the " | According to arch wiki, you may have a module not correctly installed...the " | ||
- | |||
- | {{http:// | ||
Try to prevent this by using copy and paste command to copy the grub.cfg into your boot/ folder and check its there. | Try to prevent this by using copy and paste command to copy the grub.cfg into your boot/ folder and check its there. | ||
Line 690: | Line 668: | ||
Below I deliberately renamed my normal.mod to normal.mod1 to force grub2 into rescue prompt....Do not try please. | Below I deliberately renamed my normal.mod to normal.mod1 to force grub2 into rescue prompt....Do not try please. | ||
- | |||
- | {{http:// | ||
It is unlikely you are going to destroy that module, but what I can not show you, unless its a movie....after pressing enter after typing normal, grub rescue prompt changes to grub....and then you can use manual commands to boot your system....as per.... if you have a grub prompt section. | It is unlikely you are going to destroy that module, but what I can not show you, unless its a movie....after pressing enter after typing normal, grub rescue prompt changes to grub....and then you can use manual commands to boot your system....as per.... if you have a grub prompt section. | ||
Line 698: | Line 674: | ||
Of interest to me, is that if you can not load normal, can you set (fix) the way grub2 will look for files? as per image | Of interest to me, is that if you can not load normal, can you set (fix) the way grub2 will look for files? as per image | ||
- | |||
- | {{http:// | ||
If you can do this, you are likely the to succeed repeating the " | If you can do this, you are likely the to succeed repeating the " | ||
Line 710: | Line 684: | ||
==== -- If you have no such disk (not found) ==== | ==== -- If you have no such disk (not found) ==== | ||
- | |||
- | {{http:// | ||
This is currently not solvable for me. | This is currently not solvable for me. |