Beruflich Dokumente
Kultur Dokumente
New Posts FAQ Calendar Forum Actions Quick Links Advanced Search
Forum Community Help: Check the Help Files, then come here to ask!
Newbies Corner How to use Grub2 to boot Linux manually
If this is your first visit, be sure to check out the FAQ by clicking the link above. You
may have to register before you can post: click the register link above to proceed. To
start viewing messages, select the forum that you want to visit from the selection Linuxtoday.com
below.
3 Twitter clients for the Linux command line
Setting Up XR (Crossroads) Load Balancer for Web Servers on
Page 1 of 2 1 2 Last RHEL/CentOS
Results 1 to 15 of 25 USB Killers - Hardware and Software options to destroy your data
Thread: How to use Grub2 to boot Linux manually (or devices)
How to find and remove unused packages in Linux
Share 0 Tweet Share
Linux 4.10 To Expose EFI Framebuffer Configuration
Thread Tools Display Tiny OpenWRT WiFi module updated in $12 and $4 versions
GParted 0.27.0 Open-Source Partition Editor Is Out with GRUB2
09-07-2009, 09:09 PM #1 core.img Detection
RaspEX Project Now Lets You Run Ubuntu 16.10 on Raspberry Pi 3
and 2, with LXDE
saikee
I'm totally not hacked. Linux Foundation Takes JavaScript Under Its Wings
Introduction
I notice Grub2 has been shipped by the latest Ubuntu so I have a
played with it and reported the following.
For those who are already aware Grub has an unique feature that you
can communicate with it before an operating system is booted. The
instruction to talk to Grub is given in any text Grub menu screen by
pressing the "c" key and return. Then you will be greeted by a
command prompt known as Grub prompt. In this mode Grub has an
command interpretor very much like Dos or any mini operating
system. Both Grub1 and Grub2 have such capability. The biggest
secret in Linux I have found is that there in no installed operating
system in a PC Grub cannot boot in a Grub prompt. A little bit of
knowledge of it will enable you to kiss all your booting problems good
bye.
For direct booting Grub2 can boot an installed Linux packaged with
Grub1 but not necessarily the other way round. This is because a
distro shipped with Grub2 may have Ext4 filing system installed by
default. Grub1 cannot read a Ext4 filing system.
1 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
For indirect booting both Grub1 and Grub2 can boot each other by Top White Papers and Webcasts
chainloading as the filing system is not involved. Indeed this is why
Grub1 not able to read a NTFS partition but still manages to boot the Cloud Security Playbook: Strategies &
boot loader inside of any MS Windows, regardless it is an old WIn2k or
Best Practices for Today's Volatile Threat
the Win7 that is in a trial stage.
Landscape
How to get hold of Grub2
May be there is a better way but I used a Grub2 floppy or a Grub2 CD.
Each can only be made from a Live CD that has been shipped with Security is becoming top priority
Grub2, like Ubuntu 9.10. All you need to do is to boot up such a Linux for organizations that want to stay
Live CD, get into a root terminal, put a floppy into the drive and issue protected while taking full
the following commands (originated from FranklinPiat/grub- advantage of the benefits of
mkrescue.manpage - GRUB Wiki) running in the cloud. If your
organization's cloud security
Code:
posture is driven by point solutions and lacks an
grub-mkrescue --image-type=floppy /tmp/grub-rescue.flp
overarching, comprehensive strategy, you simply can't
dd if=/tmp/grub-rescue.flp of=/dev/fd0 bs=1024
guarantee the complete security and protection of your
data, or that of your customers. This playbook on
industry best practices shows you how to build a
successful cloud security strategy from the ground up,
Basically the grub-mkrescue copies Grub2 image into the specified file and offers a
and you use the dd command to write the same onto a floppy. For a
bootable Grub2 CD the instructions are
Code:
grub-mkrescue --image-type=cdrom /tmp/grub-rescue.iso
wodim /tmp/grub-rescue.iso A Single-Platform Approach to Desktop
and Application Delivery
You can drop both floppy (any spare used one and no need to format) The end of support for Microsoft
Windows Server 2003 and Citrix
and a blank CD to do them simultaneously. Bootable Grub floppy and
XenApp 5.0 means changes are
Grub CD are the most lethal weapons in the booting business.
coming to desktop virtualization
environments. Moving to a single
Thereafter either medium boots you to a command prompt in Grub2. platform has the obvious benefit
of streamlining operations and
As similar to Grub1 there should be no installed PC system that cannot reducing costs by eliminating a
be booted by a Grub prompt from Grub2. I tried different Linux and vendor from the application delivery effort. In addition, a
MS Windows and can confirm this. This is done by indirect booting switch to a single platform offers a better management
using chainloading. system with a single console so IT administrators can
For Grub2 the commands are slightly different and the changes are
highlighted in red
Code:
set root=(hd0,2)
chainloader +1
boot
For some reasons the partition number no longer starts from zero in
Grub2. I believe the zero start for disk number in both Grub1 and
Grub2 is for compatibility with the MS systems which use the similar
numbering arrangement.
2 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
In a standard Linux the kernel name always starts with vmlinuz and
the initrd file starts with initrd. These files by default are stored in the
/boot subdirectory. Both Grub1 and Grub2 can do completion with the
tab key so if I type
Code:
kernel /boot/vmli
and follow by the tab key Grub will try to find all the files in /boot
subdirectory to match the first "vmli" caharcters. Therefore there is no
need to know the kernal and initrd filenames in advance if one knows
to use the tab key to complete the command.
Edited 10/9/09-----------------------
Thereafter the Linux in sda16, in Ext4 and has Grub2 can be booted
by any version of Grub indirectly. I tried the oldest Grub floppy
(Version 0.91) in my collection, using the normal Grub1 commands
Code:
root (hd0,15)
chainloader +1
boot
3 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a
weapon, what was it?" Replied Linux "A Live CD"
10-09-2009, 08:39 AM #2
impert
Registered User
Join Date: Sep 2008
Posts: 33
.
---from the boot options chapter of the kernel manual
Saikee, I take this opportunity to thank you for all the help I've had
from your posts, particularly on booting. I've found multi-booting to
be a great way to learn about linux. It also gives a redundancy which
makes it hard even for a clown like me to completely break all his
systems (at once, that is).
10-09-2009, 11:04 AM #3
saikee
I'm totally not hacked.
impert,
I think booting is a classic case of what Linux is all about. It only cares
about the simplest, quickest and the most efficient way to get us from
A to B.
A Linux user who takes time to understand Grub will find it a lot easier
to work with MS or others boot loaders.
4 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a
weapon, what was it?" Replied Linux "A Live CD"
10-09-2009, 06:54 PM #4
impert
Registered User
Join Date: Sep 2008
Posts: 33
One thing that 's not clear to me about Grub2 is whether it can be
installed on an ext4 filesystem. Fedora 11 comes with ext4 as the
default, and asks for a separate ext3 /boot partition. In fact the live
CD installer won't let you either install F11 to an ext3 partition, or put
the /boot directory on the ext4 / partition. And Fedora 11 comes with
Grub 0.97.
The only reference I could find on the Grub2 site says very vaguely
that Grub2 "supports" the ext4 FS. This may mean no more than that
it will boot it from an ext3 partition like Grub 0.97.
10-10-2009, 05:14 AM #5
saikee
I'm totally not hacked.
Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a
weapon, what was it?" Replied Linux "A Live CD"
10-10-2009, 07:20 AM #6
impert
5 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
Registered User
Join Date: Sep 2008
Posts: 33
Great! Thanks.
10-11-2009, 03:35 PM #7
loopback48
Registered User
Let me jump in and ask a question that might or might not be related
to this topic. I apologizes if not. I've read this post and I don't think it
is related to my problem. Maybe???
I'm using Debian Squeeze and have update when called for. I have
received a notice that my Squeeze system has 'chain loaded' Grub 2.
My question: will there be a time when all this will be fixed? That is to
say, during an upgrade this problem will be address? Or will I have to
jump through several hoops to get it fixed?
I guess I'm getting too lazy or to used to the easy way of addressing
issues that Debian is so famous for and need some input on this
problem.
Thanks.
Thanks,
Loopback48
http://www.debiantutorials.org/
10-11-2009, 04:49 PM #8
saikee
I'm totally not hacked.
6 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
I think the momentum behind using Grub2 is probably due to the Ext4
filing system which can be read by Grub2 but not legacy Grub unless
it has been doctored. The only legacy Grub that can handled Ext4 is
the one in Ubuntu 9.04. There may be more but I use this one mainly.
Grub2 isn't difficult to use even though I haven't used it in full anger
yet. I say this because I can use it to boot any system without a boot
loader installed and that is not much different from legacy Grub.
If you have Grub2 installed then press the "c" key will get a Grub2
prompt. Lets say there is an unbootable Linux in sda3 or known to
Grub2 as (hd0,3) (Legacy Grub calls it (hd0,2), so watch out).
The system can be boot by telling Grub2 the name of the root
partition and then type the following lines
Code:
set root=(hd0,3)
linux /boot/vml(press the tap key here) ro root=/dev/sda3
initrd /boot/ini(press the tap key here)
boot
Since the kernel and the ramdisk file are always start with
vmlinuz?????? and initrd???????? and stored in /boot directory
therefore by using the tap key one can get Grub2 to find files for us.
Legacy Grub can be used in the same way except the command
syntax is different in the 1st and 2nd lines.
Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a
weapon, what was it?" Replied Linux "A Live CD"
10-11-2009, 07:51 PM #9
loopback48
Registered User
saikee, thanks for the quick reply. I guess I'll have to break down and
look deeper into Grub.
7 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
Thanks,
Loopback48
http://www.debiantutorials.org/
impert
Registered User
Join Date: Sep 2008
Posts: 33
I have had a perfectly good Xubuntu Karmic from the alpha release,
which never gave a moment's trouble until the update which put in
Grub2 - it then refused to boot. I fixed that, in a moment of wrath, by
removing every Grub file (including the bits of Grub1 that remained)
and copying all the Grub1 files from my Ubuntu Hardy. It's now as
happy as a pig in poo, but going 'back' to grub1 gives me the deflated
feeling of someone who is not keeping up with the pace of things. Am
I the only ijjit who can't cope with this? Or is Grub2 still buggy? Or is
it the Ubuntu live CD?
It seems we have Grub2 because Grub1 can't handle the ext4 file
system.
My short experience of the ext4 filesystem in Ubuntu Karmic makes
me think it will be an improvement - it seems to boot much more
quickly, apps seem to load more quickly, and if it is true that it speeds
up file system checking by fsck, that alone would be worth the change
as we get ever bigger hard disks. However, if you're multibooting, and
you keep all your files in a large data partition (128G in my case, I'll
bet others have much bigger ones), then you can't use ext4 for the
data partition, which is where it would be most useful, until the last of
your distros has gone over to ext4.
8 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
and have no idea of what you'll end up with. And I suspect that some
of the scathing remarks by the grub2 developers about bad code in
Grub 1 are unjustified: after all, it works pretty well. Shame it couldn't
just be upgraded to deal with ext4.
I'd like to have another go with another live CD. Is there another good
distro using Grub2 in its live CD? I tried Pardus, but it uses Grub1,
although it lets you format the root partition as ext4. Copying the
Ubuntu Grub2 files over and chrooting and grub-mkconfigging didn't
make it boot either.
Saikee, are you using Grub2 in your MBR yet? Have you used it in the
145-distro box ?
teeitup
Guinness please
Join Date: Sep 2000
Location: N California
Posts: 953
saikee
I'm totally not hacked.
impert,
I just followed the information given in the Internet sites and got my
floppy and CD made each in one attempt. I used an installed Ubuntu
9.10.
9 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
Grub2 can boot any Linux directly or indirectly in any Linux filing
system.
If the MBR has Grub1 then it can boot every Linux indirectly and only
directly with partition not in Ext4.
I have put Grub2 in MBR from time to time but don't really bother
which Grub is there.
This thread was written to assure Linux users that Grub2 can be used
very similar as Grub1. Try with Grub2 alone in floppy or a CD. Since
my 145 systems box has every OS arranged chainloadable so either
Grub1 or Grub2 can all of them up.
Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a
weapon, what was it?" Replied Linux "A Live CD"
loopback48
Registered User
Even though I've been working with Linux for a few years I can't wrap
my brain around this one. I wish one of you brainics would take me
and others by the hand and leads us out of the darkness and into the
light.
Thanks,
Loopback48
http://www.debiantutorials.org/
teeitup
Guinness please
Join Date: Sep 2000
Location: N California
Posts: 953
If your system only has one OS installed and it's Debian Squeeze it
should be fairly straight forward. My main desktop has a single install
of Squeeze and it upgraded without issues.
10 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
way forever. If you want to go all in with Grub2 then, as root, run the
"upgrade-from-grub-legacy" script.
If you have multiple OS's loaded, as does my laptop and one desktop,
then I recommend that you install the "os-prober" package before
finalizing your upgrade. This package isn't listed as a dependency or
recommended package. Why? I don't know, but it's important if you
have multiple OS's installed.
If you have already upgraded, you can install os-prober after the fact
and then run "update-grub2" as root. Your boot menu will be rebuilt
with any OS's os-prober finds.
Good Luck,
impert
Registered User
Join Date: Sep 2008
Posts: 33
Saikee,
Thanks for the reply.
I always put Grub in the root partition. I have Grub1 in the MBR
pointing to Ubuntu Hardy in sda1, and menu.lst , sda.lst, sdb1.lst,
sdb2.lst following the hidden partition scheme you suggested
elsewhere. Now and again, when an OS won't boot, I replace
Code:
chainloader +1
with
Code:
configfile (hdx,y)/boot/grub/menu.lst
11 de 12 20/10/2016 15:53
How to use Grub2 to boot Linux manually http://forums.justlinux.com/showthread.php?152790-How-to-use-Grub2-...
gives a syntax error although that is the syntax given in the man
page.
Code:
grub-setup -v /dev/sda6
starts running, but after a huge amount of info messages it scolds me:
Page 1 of 2 1 2 Last
Posting Permissions
All times are GMT -4. The time now is 03:01 PM.
12 de 12 20/10/2016 15:53