Creating image ... Error: couldn't open file /dev/sdc2 (Read-only file system)
I'm trying to compile/build haiku from R1/alpa2. I have been able to do so from Ubuntu 10.04 but not Haiku.. In the UserBuildConfig file I have this:
# Quick start file for UserBuildConfig. Copy it and uncomment and edit the
# lines you want. See UserBuildConfig.ReadMe for details.
# Optional package OpenSSH needs this variable set
HAIKU_IMAGE_HOST_NAME = "TEST" ;
# Add these optional packages
AddOptionalHaikuImagePackages BeZillaBrowser ;
AddOptionalHaikuImagePackages Beam ;
AddOptionalHaikuImagePackages BeHappy ;
AddOptionalHaikuImagePackages BePDF ;
AddOptionalHaikuImagePackages NetSurf ;
AddOptionalHaikuImagePackages OpenSSL ;
AddOptionalHaikuImagePackages OpenSSH ;
AddOptionalHaikuImagePackages Pe ;
AddOptionalHaikuImagePackages Vision ;
AddOptionalHaikuImagePackages WebPositive ;
AddOptionalHaikuImagePackages Welcome ;
AddOptionalHaikuImagePackages WonderBrush ;
ExtractArchiveToHaikuImage home config settings :/boot/home/develop/haiku/haiku/user_data/Directories_Files_From_Settings_Folder.zip ;
ExtractArchiveToHaikuImage home :/home/develop/haiku/haiku/user_data/Home_Folder_Directories.zip ;
ExtractArchiveToHaikuImage home :/boot/home/develop/haiku/haiku/user_data/Media.zip ;
ExtractArchiveToHaikuImage apps :/boot/home/develop/haiku/haiku/user_data/Applications_From_Apps_Folder.zip ;
ExtractArchiveToHaikuImage home config be Applications :/boot/home/develop/haiku/haiku/user_data/Be_Icons_From_ConfigBeApplications.zip ;
DefineBuildProfile disk : disk : "/dev/sdc2" ;
DefineBuildProfile vmware : vmware-image ;
switch $(HAIKU_BUILD_PROFILE) {
case "disk" : {
AddOptionalHaikuImagePackages Development ;
}
case "vmware" : {
HAIKU_IMAGE_SIZE = 900 ;
}
}
In DriveSetup application the drive/partition I'm trying to build to is: /dev/disk/ata/2/master/1
The drive that I'm building Haiku on is: /dev/disk/ata/0/master/3
Before I started the build command I did in terminal;
chmod o+r /dev/disk/ata/2/master chmod o+rw /dev/disk/ata/2/master/1
I start the build with:
~/develop/haiku/haiku/generated.x86gcc2> jam -q @disk
When the process gets near the end I get this:
BuildHaikuImage1 /dev/sdc2 Creating image ... Error: couldn't open file /dev/sdc2 (Read-only file system) export imagePath="/dev/sdc2" export isImage="1" export isVMwareImage="" /boot/home/develop/haiku/haiku/build/scripts/build_haiku_image /boot/home/develop/haiku/haiku/generated.x86gcc2/haiku.image-init-vars /boot/home/develop/haiku/haiku/generated.x86gcc2/haiku.image-make-dirs /boot/home/develop/haiku/haiku/generated.x86gcc2/haiku.image-copy-files /boot/home/develop/haiku/haiku/generated.x86gcc2/haiku.image-extract-files ...failed BuildHaikuImage1 /dev/sdc2 ... ...failed updating 1 target(s)... ...updated 592 target(s)... ~/develop/haiku/haiku/generated.x86gcc2>
In UserBuildConfig I first tried: DefineBuildProfile disk : disk : "/dev/sda2" ; because that is what gpartd showed it as in linux but that got the same error.
Can someone please help me?

Comments
Re: Creating image ... Error: couldn't open file /dev/sdc2 ...
You answered your own question. ;-)
Haiku defines the drives and partitions differently from Linux.
/dev/sdc2 might be:
/dev/disk/ata/2/master/1
Verify this is the correct partition and change it in your UserBuildConfig. Use DriveSetup to get the right partition information.
Re: Creating image ... Error: couldn't open file /dev/sdc2 ...
I edited UserBuildConfig with: /dev/disk/ata/2/master/1, that woks. Thanks for the help.