Dropping to a shell in %post

Dan Trainor info at hostinthebox.net
Wed Jun 29 00:51:34 UTC 2005


Dan Trainor wrote:
> Daniel Segall wrote:
> 
>>Are you actually specifying that full path? If so, that would be your
>>problem. You are already chroot'd in /mnt/sysimage, so if you told it
>>/mnt/sysimage/somepath, it would be interpreted literally.
>>
>>-Dan
>>
>>
>>
>>>Dan Carpenter wrote:
>>>
>>>
>>>>On 6/24/05, Dan Trainor <info at hostinthebox.net> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Is it possible to drop to a sh shell in or after %post, so that I can
>>>>>poke around and get familiar with the %post enviornment to see about
>>>>>donig some things later on?
>>>>
>>>>
>>>>add these lines to your %post.
>>>>
>>>>echo "Dropping to a shell"
>>>>open -c 8 bash
>>>>read tmp
>>>>
>>>>The echo prints to tty3 so you probably won't see it...  Not sure how
>>>>to put stuff on the first tty.  This will pause the install until you
>>>>press Enter on the front screen.  You can switch to tty8 to do
>>>>whatever you want.
>>>>
>>>>regards,
>>>>dan carpenter
>>>>
>>>
>>>Dan -
>>>
>>>Awesome, that's what I was looking for.  I'm having troule finding out
>>>why I can't install two additional RPMs in %post, saying that the files
>>>are not present.  I am copying them from
>>>/mnt/source/thedirthatiputfilesin to /mnt/sysimage/tmp/mynewdir, so I'd
>>>like to troubleshoot that.
>>>
>>>Thanks
>>>-dant
>>>
> 
> 
> Hey, dan -
> 
> This past post has taught be a little bit more about the env.  How might
> I go about finding out where my cdrom drive is mounted (is it even still
> mounted in %post?) inside of the chroot?
> 
> Thanks!
> -dant
> 
> 
Hi -

I think I can use /tmp/cdrom as the block device to mount, in an attempt
to copy additional files off of the CD, into the env setup that I use
from tty2.

What I'd like to do, in %post, is install a bunch of additonal RPMs off
of the install CD.  However, I get a whole lot of dependency errors.  I
believe this is caused iether because nothing is in the library search
path, an RPM database is not yet constructed, or because this is just
one stupid idea in itself and it will never work and I'm just wasting my
time.

Can someone shed some light on this subject?  I would be very greatful.

Thanks!
-dant




More information about the Kickstart-list mailing list