From: Sidney Lambe on
On comp.os.linux.misc, Ohhhh maaan <nobodyhere(a)example.com> wrote:

[delete]

This is a stupid thread. You stick the rescue cd into the slot
and you reboot and then you mount the hdd make your repairs.
You don't need to "drop into a shell" because you will already
be in one when the rescue CD boots or you wouldn't be able to
use it. That's where that command prompt comes from.

You are either very ignorant of Linux and need to shut your
mouth and listen to and take the advice of people who know more
than you do.

Or you are stinking troll. If you don't choose to do the
above in short order I am going to killfile you.

Sid


From: jellybean stonerfish on
On Wed, 19 May 2010 22:02:01 +0100, The Natural Philosopher wrote:


> another possibility is to slap another disk in the primary, install to
> that, mount the original and fix it.

Buawaa ha ha

From: Ohhhh maaan on
unruh wrote:

> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>> unruh wrote:
>>
>>> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>>>> Keith Keller wrote:
>>>>
>>>>> ["Followup-To:" header set to comp.os.linux.misc.]
>>>>>
>>>>> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>>>>>>
>>>>>> I've used Linux years ago and I think I recall you could just
>>>>>> type linux single or linux emergency at the boot CD, but nothing
>>>>>> works with this new CentOS 5.x rescue CD. I'm stuck at "boot:"
>>>>>> and nothing I try just drops/boots me into a shell prompt.
>>>>>> Please, help! :)
>>>>>
>>>>> Close: it's linux rescue, not emergency:
>>>>>
>>>>>
>>>>
>>
http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
>>>>>
>>>>> But I believe the onscreen text tells you to hit F5 for help and
>>>>> other boot options, so you should look for that next time. See
>>>>> e.g.
>>>>>
>>>>> http://www.go2linux.org/pics/centos-base/Screenshot.png
>>>>>
>>>>> Hitting F5 gives you more information on booting the CD in rescue
>>>>> mode.
>>>>>
>>>>> --keith
>>>>>
>>>>
>>>> Yes, I know what it says. I did that already, and it just goes to
>>>> the same install screen. Doesn't matter if I type linux, linux
>>>> text, linux rescue, or just hit enter, or try linux single, linux
>>>> emergency, or anything else, it _always_ goes to the text menus and
>>>> doesn't allow me to break out of it or drop to a shell prompt, or
>>>> anything else. It just
>>>> wants the install disk images. In fact, the link you've provided
>>>> says it all:
>>>>
>>>> "Once you have booted using one of the described methods, add the
>>>> keyword rescue as a kernel parameter. For example, for an x86
>>>> system, type the following command at the installation boot prompt:
>>>>
>>>>
>>>> linux rescue
>>>>
>>>>
>>>>
>>>> You are prompted to answer a few basic questions, including which
>>>> language to use. It also prompts you to select where a valid rescue
>>>> image is located. Select from Local CD-ROM, Hard Drive, NFS image,
>>>> FTP, or HTTP. The location selected must contain a valid
>>>> installation tree "
>>>>
>>>> It simply does not allow me to skip or select any options that
>>>> allow me to even get to the point where I can get shell access. I
>>>> definitely recall that the boot CD's allowed a person to jump right
>>>> into a shell if they wanted, even without using the installed
>>>> bootloader, and I can't find any information to show where someone
>>>> can just boot from the CD's kernel and drop into a shell and run
>>>> commands (it always wants the install images).
>>>
>>> Uh, the shell runs on top of the kernel.
>>
>> Yes, I know.
>>
>>> It MUST load a kernel to run
>>> the shell,
>>
>> Yes, that is the point to the boot CD.
>
> No The boot cd simply loads an braindead little program which then
> loads the kernel. It itself does not load the kernel. (Well it depends
> on which "boot CD" you have)

The boot (or live) CD or rescue CD will load a kernel on the CD itself.
This is how you have a stripped down environment for rescue or doing
work. Not that you can't use such a method to boot off of a kernel on
the actual drive you're wanting to access, if it's possible and
working.

>>
>>> so tell it where to get tthe kernel so you can run the
>>> shell.
>>
>> It will not boot another kernel, thus I'm locked into the rescue mode
>> steps. This is the problem.
>
> Tell us what you have as what you call a "boot cd"

Anything that boots a Linux dist I can use, a boot CD is often referred
to as a live CD. Just a stripped down OS all on the CD itself.

>>
>> So, do you know how to drop into shell after the rescue CD's kernel
>> is loaded and not go through the rescue steps that want the CentOS
>> images, so I can just drop into shell?
>
> I do not use redhat or centos, so cannot swear, but I suspect that it
> is not loading a kernel, but simply a little program that asks you
> questions so it knows which kernel and which options to that kernel to
> use.

It's loading the kernel for the rescue portion normally, which is good,
but it's also loading the install/rescue portion that can't be broken
out of. I want to use that kernel from the CD, it's working as
expected, but there's no way to drop into shell (at least not until you
get to that point in the rescue mode portion, but it's not allowing me
to get that far). I suppose it doesn't matter, no one seems to know how
to get past it, so I need to just boot with any live CD they have so I
can run grub. I was just hopeful there was a method using a rescue CD
to get that access I need.

From: Ohhhh maaan on
Keith Keller wrote:

> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>>
>> Yes, but the issue is the installed kernel. I need to just run grub
>> for it.
>
> I don't understand what this is supposed to mean.

I mentioned the kernel when you asked if I just need to edit a file on
an otherwise healthy system. I didn't mean to confuse anyone. In
otherwords, I can't just use the rescue CD to tell it to boot from an
installed kernel. I omitted that portion of my response by mistake.

> Is grub installed
> into the MBR?

It should be, but it's not acting like it. This is why I want to ensure
it's installed and I believe it will resolve the issue so I can boot
into the system normally from the primary drive.

> Does grub start after the BIOS is done?

Yes, but it immediately errors.

> Is the change
> you need to make simply fixing the grub configuration?

Possibly, but I think that the guy before me neglected to install grub
on the new drive when the data was mirrored.

> It'd be really
> helpful if you explained in more detail the problem you need to fix.

Well, it shouldn't matter a whole lot, because regardless of what the
issue is, my question was about using a rescue CD (as a live CD) to
gain shell access and I can do numerous tasks at that point. I don't
yet know exactly what the issue is, if it's a config file, running the
grub installer, etc., and all of these problems can be instantly
resolved so long as I have access from a live CD. If no one knows of a
way to get shell access from a rescue CD, then that's all I wanted to
know... because I sure don't (it's not working at all and keeps asking
for the media to grab the IOS images for the OS and allows no way to
skip or ignore that).

>> I would certainly consider this, if this were an option at the DC. It
>> might be, but I suppose this is my question; Can you just do this
>> from a rescue CD? I used to do it in RH 4, etc. a long time ago, so
>> does that option/method not exist now? So, I need a live CD, not a
>> rescue CD?
>
> There's no technical difference between a live CD, a rescue CD, and an
> install CD:

That's what I thought as well, so how in the world does someone skip it
asking for a rescue image that it's unable to find?

> they all boot some sort of linux kernel, and start up some
> programs once an init takes over.

Right, and that's what I need. Should be simple.

> The difference is mainly cosmetic:
> typically a ''live'' CD is close to what a ''normal'' user would
> expect from booting a full distribution from hard disk (e.g., with
> full
> networking, X, possibly even KDE or GNOME). A ''rescue'' CD often
> comes with extra utilities for testing or recovering from drastic
> error
> scenarios. And an ''install'' CD runs the installer program that the
> distro maintainers wrote (and sometimes makes it slightly more
> difficult to deviate from the install process).

Right, and all should offer the ability to drop into or be in shell and
type commands. This is what I'm asking.

> But, as others have mentioned, in most cases access to a shell is
> always
> there.

Yes, I'm certain that's what it's running off of, but how to get to it?
I.e., if I was in a boot loader (lilo), I could CTRL+X, if I was in
grub, I could type linux single... or any number of things.

> I know that the CentOS installer does allow you to switch to a
> different virtual console with Ctrl-Alt-Fn (n=1,2,3,4, possibly 5 and
> 6?).

Right, but the KVM access I have doesn't allow this. That would indeed
be very simple.

> Since the remote KVM is in the middle this switching is
> obviously
> more complicated. It'll definitely be worth investigating how to pass
> these sequences down the channel, so that if you have difficulty in
> the future you'll be able to switch VCs.

Yes, that's what I was thinking, too. I was just trying to determine if
there was some command or specific boot option from a rescue CD to drop
into shell.

> Another boot CD will have different utilities available for you;
> the advantage of using the CentOS CD is that you know the versions of
> its software will be very close to your installed distro (and should
> be able to support anything more exotic you did, such as LVM or
> unusual
> filesystems). But if you know what your environment is like, *any*
> boot CD that supports it will work fine to manipulate the filesystems.

Yeah, I think a lot will work fine, just getting to shell, it should be
so simple. I've not done this for a long time (haven't had to), but I
just don't see the option or method to do this. It's an endless loop,
where it doesn't allow me to do anything but select the media source
for rescue images. The CD itself isn't working (says it's not valid),
and I forget what combination of keys I used, but it just reboots the
system.

> In particular, if you need to modify the grub configuration, all you
> really need is filesystem support (including LVM if you used that) and
> an editor. Google "linux rescue cd" for many different options.
>
> --keith
>


I've googled to death and nothing mentions how to get to shell. This is
all I want to do.
From: Ohhhh maaan on
unruh wrote:

> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>> unruh wrote:
>>
>>> On 2010-05-19, Ohhhh maaan <nobodyhere(a)example.com> wrote:
>>>> I have a kernel panic and need to fix a typo. I don't have the
>>>> install disks, and I just want to use the CD to access the shell
>>>> prompt so I can run the commands need. I can't get to the grub boot
>>>> loader screen.
>>>>
>>>> Anyway, I run this and it asks for linux or linux text, and no
>>>> matter what I do, I can't just have it load the kernel image from
>>>> the rescue CD and drop into shell. It always wants to install and
>>>> asks for the images. How in the world can someone just drop into a
>>>> shell prompt?
>>>>
>>>> I've used Linux years ago and I think I recall you could just type
>>>> linux single or linux emergency at the boot CD, but nothing works
>>>> with this new CentOS 5.x rescue CD. I'm stuck at "boot:" and
>>>> nothing I try just drops/boots me into a shell prompt. Please,
>>>> help! :)
>>>
>>> Did you try typing "rescue" when it is stuck at "boot:"?
>>
>> Yes, of course. And, it went into rescue, which is not what I want.
>> Or, is this entire issue about some issue with the file system where
>> it should otherwise BE dropping into shell? This is what I'm trying
>> to figure out.
>
> What? You tell us you want to go into rescue and then when it goes
> into rescue you say "that is not what I want" What do you want?
> Go into rescue, mount the partitions, fix them and reboot

How many times do I need to repeat myself in this thread? I stated I
want the rescue CD to go through whatever steps it needs to (if any)
and drop me into a shell prompt. It does not, it asks for the rescue
media source and won't let me go further until I give that information.
When I do (i.e., the CD rom drive), it says it's not a valid image. I
never GET to the point where I can MOUNT anything. HENCE, WHY I asked
if there's a way to just skip all of that, bypass that junk and drop
into a shell prompt (so I can mount partitions and do the work I need
to do). In other words, should it continue happily along until it drops
me into shell, without the requirement of rescue images, etc., since
it's loaded the kernel from the CD and I just need shell and all is
well in the world? Perhaps my image is corrupt or the disk or CD rom
drive is bad?