Re: cdrom issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Keith Roberts wrote:
On Thu, 22 Jan 2009, Gerald Waugh wrote:

To: kickstart-list@xxxxxxxxxx
From: Gerald Waugh <gwaugh@xxxxxxxxxxxxxxxxxxxxxxx>
Subject: cdrom issue

On CentOS4 we mounted the install cdrom in %post
And copied some files over to the hard drive.
This does not work with CentOS5.2

%post --nochroot
# Mount CDROM
/usr/bin/mkdir /mnt/source
# /usr/bin/mount /tmp/cdrom /mnt/source
/usr/bin/mount /dev/cdrom /mnt/source

# Move PKGS Over to /tmp/PKGS
/usr/bin/mkdir /mnt/sysimage/tmp/PKGS
/usr/bin/cp -Rp /mnt/source/PKGS/* /mnt/sysimage/tmp/PKGS >/dev/null
2>&1

# Unmount CDROM
/usr/bin/umount /mnt/source

%post
# Run post install script
/tmp/finish_install.sh



-
Gerald


Hi Gerald. I'm a new user to kickstart so please bear with me.

I managed to mount a seperate working Fedora root partition without using the --nochroot option. I had to make the device node as well. Here is the relevant part of my kickstart file:

Maybe this approach would help with your problem?

#---------------------------------------------------

# Packages and groups to install.
%packages --nobase
@british-support

# Needed for mknod.
coreutils
%end

#---------------------------------------------------

# Post installation script.
%post --interpreter /bin/bash --log=/root/F10-basic-2.ks-log --erroronfail

# Create the /mnt/F8-root directory.
mkdir /mnt/F8-root

#---------------------------------------------------
# Create the device node for /dev/sda1 drive.
mknod /dev/sda1 b 8 1
#---------------------------------------------------

Risky.
Trust me, you don't want two device nodes for one device. I would fully expect harm to the filesystem. If you get away with it, you're lucky.

Whether to use --chroot is a often matter of taste and coding, influenced by available resources including device nodes.

I don't know where anaconda creates its device nodes now, they used to be in /tmp and only exist when required. It might be now that anaconda relies on the kernel or dbus or something else creating them somewhere.

When in the %post and %pre scripts, device nodes for the target storage exist. Probably they do for the install device too, but it's a long time since I looked, mostly I install off the LAN (using http).

--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux