Re: partitioning in %pre

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

 



On Thu, 3 Apr 2003 James_Martin@xxxxxxxxxxxxxxx wrote:

> I'm trying to setup a 50MB partition in %pre that will house the Compaq
> System Partition.  Here's what I've got so far:
> 
> ####
> %pre
> 
> #create the disk device
> 
> mknod /dev/cciss/c0d0
> 
> #wipe out current disk
> 
> echo | fdisk /dev/cciss/c0d0 << EOF

That part is wrong: both the '|' and the '<<' signify content for stdin.
Change to:
fdisk /dev/cciss/c0d0 << EOF

You can also combine both fdisks into one.


> o
> w
> EOF
> 
> echo | fdisk /dev/cciss/c0d0 << EOF
> n
> p
> 1
> 
> +50M
> t
> 1
> 12
> w
> EOF
> 
> ###
> 
> Unfortunately when I do this, anaconda fails when it tries to partition the
> disk.
> 
> Any pointers?

I use this highly-redundant script in another context:
[root@magpie root]# cat /tftpboot/installer/bin/dl/dl-partition
#!/bin/bash
export BootPartition=25 RootPartition=''
function partition_disks()
{
#fdisk -l /dev/hda
dd if=/dev/zero count=1 of=/dev/hda
fdisk /dev/hda <<E
d
1
d
2
d
3
d
4
n
p
1
1
+${BootPartition}M
n
p
2

${RootPartition}
p
w
E

}
[root@magpie root]#

The dd is there because I wanted to clobber the MBR.


As to the specific error you have, we need better information.

If you are using a text install, you can get this by using a null-modem
cable and minicom. Configure minicom to not initialise the modem, set a
speed of (say) 57600.

Boot the install kernel:
linux console=ttyS0,57600

If you're doing a graphical install, on your workstation
xhost +
echo $DISPLAY
and boot Linux
linux DISPLAY=myworkstation:0

Change ':0' to suite: I might use '12.0'
root@kite:~# echo $DISPLAY
localhost:12.0


-- 
Please, reply only to the 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