Jump to content
Welcome to our new Citrix community!
  • 0

Primary-disk is not always called sda. Some times it is sdb or sdc. How to handle this during PXE installation?


Ramanadha Reddy

Question

I have only one disk attached to the system. I am trying to install Xen Server in PXE method using unattended answer (kickstart) file.

I am finding a problem with below line of unattended_answer_file (kickstart file):
<primary-disk guest-storage="yes">sda</primary-disk>

Issue is, the installer does not always recognize my disk as sda.
It sometimes recognizes the disk as sdb or sdc.

When this is the case, the installer fails to find the disk named sda and fails to install the OS.
How to handle this situation? How to supply the correct disk name dynamically, and not statically as 'sda'? Thanks for your time and help.

 

I need to deploy Xen Server on multiple hardware platforms of various kinds.

Link to comment

9 answers to this question

Recommended Posts

  • 0

Hi Alan and Tobias,

Thank you for responding to my post. I guess by SR, you mean the Storage Repository. Let me clarify my case: I am not using XenCenter yet.

I am trying to install Xen Server on a bare metal rack mount server, that has a RAID controller card, controlling a single hard disk configured as RAID 0, it is set as the only bootable disk.

This disk is sometimes seen as sda and sometimes as sdb or sdc or sde. My PXE server is RedHat 7.x based.

I am giving my unattended_answer/kickstart file contents here below:

 

<?xml version="1.0"?>
<installation mode="fresh" srtype="ext">
<keymap>us</keymap>
<primary-disk>sda</primary-disk>
<root-password>DummyPassword</root-password>
<source type="url">http://192.168.1.1/os/xen6/xs-6.5-ga</source>
<admin-interface name="eth0" proto="dhcp" />
<timezone>America/Los_Angeles</timezone>
</installation>
 

When the installed recognizes the disk as sda, installation will be done as expected. 

When the installer recognizes the disk as sdb or sdc ..., the installation throws error because it is expecting <primary-disk>sda</primary-disk>

Hope I made it clearer now. If the installer recognizes the disk as sda at all times, I will not see this issue.

Any ideas on how to handle this situation would help me a great deal.

 

Thank you,

Ram

 

Link to comment
  • 0

Is this a hardware RAID disk, on the HCL? I ask because software ('fake") RAID is not supported on XenServer and attempts to use it will be potentially unreliable.

I have never seen a primary disk not show up as either sda or xvda.

Also, using a Red Hat kickstart script I suspect will not work reliably, either; you have to either boot from a CD/DVD-ROM or use a TFTP or HTTP PXE network boot to the installation media in order to install XenServer/Citrix Hypervisor. See for example:

https://www.citrix.com/blogs/wp-content/uploads/2013/08/XenServer_unattended_installation_v10.pdf

 

-=Tobias

Link to comment
  • 0

Yea, I thought it was different servers that were giving you unexpected hard drive detections, if its the same hardware that is doing this 

is a problem, just not sure where. I've never seen a primary hard drive not show up as sda either, and definitely not consistent.  And yes,

by SR I meant Storage Repository.  primary-disk guest-storage="yes">sda</primary-disk> is you telling XenServer where to create your

local Storage Repository. If you don't need one you could just opt out of creating one.

 

--Alan--

 

Link to comment
  • 0
19 hours ago, Tobias Kreidl said:

using a Red Hat kickstart script I suspect will not work reliably, either

Agree with you. This doesn't seem to be a viable idea to implement, since %pre scripts will run commands when the kickstart file is already parsed by the installer. To your other question, yes, I am using a hardware RAID adapter.

 

16 hours ago, Alan Lantz said:

 primary-disk guest-storage="yes">sda</primary-disk> is you telling XenServer where to create your

local Storage Repository. If you don't need one you could just opt out of creating one

I removed this line entirely, but the installer will complain about not specifying this entry in the XML file.

Tried a wild-card also "sd*", but it will literally look for sd* and not substitute with a letter like [a|b|c].

There should be an XML element by which we can specify the first available disk (whatever its name may be).

Please let me know if you are aware of any such kickstart file directive for Xen Server.

 

Link to comment
  • 0

It's certainly not on the list of supported features; you might be able to make it work -- as you have -- some of the time, but I'm not aware of Kickstarter supporting script features like wildcards, loos and the like. You might have to have individual scripts hard-coded with sda, sdb, sdc, etc. and try them all as a primitive workaround.

Sorry,

-=Tobias

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...