Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:grub2_from_grub1 [2012/01/19 11:00] – substituting missing stashbox images bernhardwiki: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 USB stick.
  
  
Line 14: Line 14:
 <code>sudo find / -name grub-install</code> <code>sudo find / -name grub-install</code>
  
-If found,  remove grub-0.97-splash.tcz from any onboot.lst, using either the cpanel or root powers to edit the file, then reboot with backup (to save the change) and start afresh please.+If found,  remove grub-0.97-splash.tcz from any onboot.lst, using either the cPanel or root powers to edit the file, then reboot with backup (to save the change) and start afresh please.
  
 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 56: Line 56:
 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 to ensure no grub2 packages persists over reboot please. The way the package maintainer has designed the grub2 for TC, is to act the same way as grub-legacy. That means, it used grub.cfg as an "absolute" config file and not generated by any scripts. Therefore, the only files that should persist for grub2, are those installed under boot/grub which relate to your backup of the tce directory. +Leaping ahead, when you install any grub2 package, use cPanel to ensure no grub2 packages persist over reboot please. The way the package maintainer has designed the grub2 for TC, is to act the same way as grub-legacy. That means, it used grub.cfg as an "absolute" config file and not generated by any scripts. Therefore, the only files that should persist for grub2, are those installed under boot/grub which relate to your backup of the tce directory.
  
  
Line 63: Line 62:
  
 ===== Part one ===== ===== Part one =====
-As grub2 depends on grep, replacing busybox grep, my /bin/true command now works. Please read this carefully. Its a safer option.+As grub2 depends on grep, replacing busybox grep, my /bin/true command now works. Please read this carefully. It'a safer option.
  
 Firstly your MBR remains grub-legacy. Firstly your MBR remains grub-legacy.
  
-Secondly I suggest you use the cpanel and tab to Ondemand and allow your grub2 packages to be "on demand" rather than persist as "installed".+Secondly I suggest you use the cPanel and tab to Ondemand and allow your grub2 packages to be "on demand" rather than persist as "installed".
  
 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://stashbox.org/945875/zz-ond.jpeg}} 
  
 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.
Line 114: 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.
- 
- 
- 
  
 ======  Installation to MBR ====== ======  Installation to MBR ======
Line 125: Line 119:
  
 <code>sudo grub-install --no-floppy --root-directory=/mnt/sda1 /dev/sda</code> <code>sudo grub-install --no-floppy --root-directory=/mnt/sda1 /dev/sda</code>
- 
-{{http://stashbox.org/945186/zz-install.jpeg}} 
  
 Please note that TC is different from "traditional distros" Please note that TC is different from "traditional distros"
Line 159: 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://stashbox.org/1118506/xx-shot-cut.png}} 
  
 A cut down grub.cfg without any wallpaper becomes A cut down grub.cfg without any wallpaper becomes
Line 359: 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://stashbox.org/943421/zz-menu1.jpeg}} 
  
 If we upgrade our kernel and use different version numbers, my config file will not update unless you modify it manually. Alternatively, sym link the old kernel to bzImage-old and the new one to bzImage and then you don't need to change your config unless you need to run more than 2 kernels. If we upgrade our kernel and use different version numbers, my config file will not update unless you modify it manually. Alternatively, sym link the old kernel to bzImage-old and the new one to bzImage and then you don't need to change your config unless you need to run more than 2 kernels.
Line 413: Line 401:
  
 Change hda1 to your target partition if applicable please. Change hda1 to your target partition if applicable please.
- 
-{{http://stashbox.org/943417/zz-e2label.jpeg}} 
  
 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 434: 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 450: 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.
- 
- 
  
 ======  Locale settings  ====== ======  Locale settings  ======
Line 539: Line 519:
 vbetest vbetest
  
-{{http://stashbox.org/911685/xx-vbetest.png}} 
  
 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 547: Line 526:
 <code> grub > set pager=1 # means turn on pager function like less allows scroll paging <code> grub > set pager=1 # means turn on pager function like less allows scroll paging
 grub > vbeinfo </code> grub > vbeinfo </code>
- 
-{{http://stashbox.org/924691/xx-pager.png}} 
- 
-{{http://stashbox.org/924693/xx-vbe1.png}} 
- 
-{{http://stashbox.org/924692/xx-vbe2.png}} 
  
 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 567: 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" not the resize canvas please. Depending on how image was initially built...mine in a digital still camera...you may get a lot of options. +If you like mtpaint here is a quick guide to how to resize.....Open the image with mtpaint.....Pulldown Image.....Click on "scale canvas" not the resize canvas please. 
- +
-{{http://stashbox.org/924153/xx-scale.png}}+
  
 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. (scaled for this wiki by a factor of two, Menuentry is an older version of grub.cfg) 
- 
-{{http://stashbox.org/1118507/xx-118fontsml-2.png}} 
  
 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 588: 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://stashbox.org/945192/zz-wall.jpeg}} 
  
 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 648: Line 613:
  
 http://forum.tinycorelinux.net/index.php?topic=6752.0 http://forum.tinycorelinux.net/index.php?topic=6752.0
- 
- 
- 
- 
- 
  
 ======  Chainloading ====== ======  Chainloading ======
Line 662: 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://stashbox.org/929642/xx-cmode.png}} 
  
 The key differences  between your config file and command mode are (a) You may need to define where your /boot partition if you have multiple systems and (b) last command is boot then press enter. The key differences  between your config file and command mode are (a) You may need to define where your /boot partition if you have multiple systems and (b) last command is boot then press enter.
Line 678: Line 636:
  
 simple...ls returns drives detected and partitions detected. simple...ls returns drives detected and partitions detected.
- 
-{{http://stashbox.org/924137/xx-ls.png}} 
  
 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 "autocomplete" or suggest files that match current string Note that I have pressed the TAB key....which also works for grub-legacy to "autocomplete" or suggest files that match current string
- 
-{{http://stashbox.org/924143/xx-cat-tab.png}} 
  
 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://stashbox.org/930882/xx-lsmod.jpeg}} 
  
 The bottom of above image shows....using the "absolute" pathway to a file....to discover if it exists....for normal.mod to show a positive result and for grub.cfg showing a negative result. However, you can also use a normal pathway as per below image  The bottom of above image shows....using the "absolute" pathway to a file....to discover if it exists....for normal.mod to show a positive result and for grub.cfg showing a negative result. However, you can also use a normal pathway as per below image 
- 
-{{http://stashbox.org/930884/xx-cfg1.jpeg}} 
  
 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 701: Line 651:
  
 According to arch wiki, you may have a module not correctly installed...the "normal.mod" or grub2 can not find a grub.cfg or can not find a correctly syntaxed grub.cfg. According to arch wiki, you may have a module not correctly installed...the "normal.mod" or grub2 can not find a grub.cfg or can not find a correctly syntaxed grub.cfg.
- 
-{{http://stashbox.org/930976/xx-gr.jpeg}} 
  
 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 720: 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://stashbox.org/930978/xx-n1.jpeg}} 
  
 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 728: 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://stashbox.org/938244/zz-set.jpeg}} 
  
 If you can do this, you are likely the to succeed repeating the "normal" module insertion but if you can not, its time to cut losses. If you can do this, you are likely the to succeed repeating the "normal" module insertion but if you can not, its time to cut losses.
Line 740: Line 684:
  
 ====  -- If you have no such disk (not found) ==== ====  -- If you have no such disk (not found) ====
- 
-{{http://stashbox.org/932885/zz-merr.jpeg}} 
  
 This is currently not solvable for me. This is currently not solvable for me.
Print/export
QR Code
QR Code wiki:grub2_from_grub1 (generated for current page)