ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Synopsis: Windows Imaging System script. Windows XP on NTFS containing two partitions on one drive. I have the script I need running beautifully. Manually I've taken care of the resizing, imaging and compressing. The problem comes in when I go to expand the volumes again on the follow up system.
The intent is to create a no user input needed image disk. I've imaged my syspreped/ntfsresized system using dd piped through bzip2. The script I've written partitions the drive in 1/2 unpacks the images and writes them back to the new system using cplbar for progress. Anyhow, all that works perfectly, it images the first half of the first partition, ejects the dvd, requests the second one using a "dialog --msgbox" then I have loop script that runs after the OK button is pressed attempting to mount the cd until df greps a /mnt/cdrom entry then it moves on, does the second half of the first part, the second part then the MBR. After this ntfsresize is run again to expand the volumes into the partitions. This is where I'm having trouble. ntfsresize does not have a quiet/no interaction/all answer y switch and it of course prompts the user to proceed with the expansion on both partitions. I need to circumvent this prompt somehow. My end users that the disks are intended for would probably have a heart attack if the read that message ntfsresize prints to the screen and enter n instead of y. Trust me, these guys are not computer literate and everything on their machines is critical. Any ideas? I'm experimenting with expect scripting for the final steps, but I've read another post where someone had issues with expect and ntfsresize. Any ideas are greatly appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.