LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   parted question (https://www.linuxquestions.org/questions/linux-software-2/parted-question-57509/)

lockejr 04-30-2003 02:53 PM

parted question
 
Ok here is my scenario

At my company we have our own linux distro that we preinstall on the computers we sell. I have been put in charge of making the installation easier.

The way it worked before I took over is you would put the harddrive in a machine that already had 2 hardrives. 1 boot and the other is the image. it would dd the contents of the image drive to the new one and then run parted to resize the drive. we have 4 sizes of drives 20, 40, 60, and 80. it had a separate script for each one.

Now here is how i have changed it. I wrote a script that uses /proc/ide/hdc/geometry to see what size the drive is and then use the appropriate script. made things much easier. then they decided they wanted to do a multi-cast duplication after the machines are all put together. ok i tweaked UDPCast to meet our needs and used it.

The problem is UDPCast takes forever on a 20 gig so a 80 would take several hours. They want to only transfer the 6 gig partition that we actually use and then run the parted scripts again to resize.

My though was to make a customized knoppix disk and have it do the auto sense thing and resize the partition for me. well it doesn't work. I put the script in /etc/rc3.d (after changing the default runlevel to 3) and it doesn't run at boot up like it is supposed to according to the documentation. plus when i try to run the script just from a command prompt it tells me that hda2 is in use. how can this be?

Anyone have any ideas how I can make this work or a good alternative. It has to be something that you just pop the cd in and it does it's thing. no user intervention.


thanks

david_ross 04-30-2003 03:24 PM

Your best bet is probably to use partimage.
1) Get a minimalist distro
2) Install partimage
3) Use partimage to copy the partitions on your preconfigured drive
4) Remove the preconfigured drive and replace with a blank one
5) Create the partitions
6) Run partimage to copy the partitions back

Once this is done once you only need steps 5 & 6 and these could probably be handled by a seperate script so you only have to boot and type:
makemealinuxcomputernow

or:
go

for short ;)

lockejr 04-30-2003 03:40 PM

Thanks man I will look at doing that.


All times are GMT -5. The time now is 10:53 PM.