BeOS Installation CD Guide by Jess Tipton


(edited by Chris "Technix" Simmons.) "Make your BeOS PE cd as slick as the PRO cd..."

Sections:

Image Preparation

For the most part people download BeOS Personal Edition, and later, if they like it they want to make a install cd or just have more than 500mb of space for their BeOS partition.

Now before we start there have to be certain conditions met. If you are going to jam pack the install with tons of software then you are going to need to make that 500mb iso bigger. For this you will need a larger BFS or fat32 partition. If you do not have that then your going to be stuck with the 500mb image.be.

Normally this is fine - you just have to remember to delete the swap file that may be hogging up a few 100mb! (See "Swap Killer")

Get To It!

Now you have the goods. A large (at least a gig for good measure) BFS partition or a fat32 drive with at least 700mb of free space. Now this will vary on your end decision of what to burn the cd with. If your going to choose NERO (Recommended for burning in Windows) you are going to be limited to a image size of 678mb. Yes if your using a 700mb cd your going to lose 20mb to the boot sector. Other wise you can go for an image size of about 697mb Most 700mb cd's are only 699mb or some other rather close but not quite there number. Now to create your larger BFS iso we are going to use "dd". In a Terminal type or paste the line below making changes as you need. 698 is the size of the iso the line will create & the of= is the name of the file & where it will be.

With this in mind, let's pretend you're running PE on a 500mb image. You don't have 698mb free to make this huge file. This is where the fat32 drive comes into use. (Note we cannot write to NTFS & some Linux file systems so make sure you attempt this with a file system BeOS has READ/WRITE access too.) Now to altar the line for say a fat32 partition mount the fat32 partition & change the of= line to reflect it. Most Windows 98 & 95 volumes seem to be left unnamed so I will give you 2 examples below. Don't forget to mount the drive your trying to use... heh

On BFS --->	dd if=/dev/zero of=Be.img bs=1024 count=$(expr 698 \* 1024)
On fat --->	dd if/dev/zero of=/Fat32/Be.img bs=1024 count=$(expr 698 \* 1024)

Sometimes fat32 drives are left without names as Windows will just show then as C:\ D:\ & so on. So if this is the case Be will show them as volumes named "no name". If you have no working knowledge of BASH typing "no name" into the lines above is going to leave you scratching your head. You need to add a \ then a space to the line for every space in the name, so if your volume does have a name but has spaces it will need to look like this.

dd if=/dev/zero of=My\ Drive/Be.img bs=1024 count=$(expr 698 \* 1024)

Also if your making the image some where other then the root of the drive you will need to extend the path on the "of=" section of the line.

dd if=/dev/zero of=no\ name/Cool\ Stuff/BeOS/Be.img bs=1024 count$(expr 698 \* 1024)

Now with any luck when the shell returns things to your control your going to have a a 600+mb chunk of nothing sitting on your drive. Yep its just a big waste of nothing right now. So now you need to make it a BFS image. To do this we are going to need to go to the image in your Terminal. So lets set this up for consistencies sake.

Let's pretend we used this for our image:

dd if=/dev/zero of=no\ name/BeOS/Be.img bs=1024 count=$(expr 698 \* 1024)

Now in your Terminal type:

cd no\ name/BeOS/ (now hit enter)

Now type ls & hit enter again - you should see a file called "Be.img". Now this is pretty easy as you can fall back on the defaults of the next tool & just type:

makebfs Be.img

In a moment you have a 698mb BFS image to hatch your evil plan on!
MUH HAHAHAHA

What if you're stuck with a 500mb drive? Well not to worry we can do wonders with that 500mb. Now since your are going to need space that may be taken up by swap file this can be a tad hairy. There are a few ideas you can call into play here. Now first off This might not apply to you as if you have a decent amount of ram it may have never made a swap file stating you didn't have enough free space if this is the case you can skip ahead to "Get to it!". Now let's say you have installed BeOS to a NTFS partition. You can read but not write to the file system your image is on. One way around this & will work for any read only file system is if you have enough room for a second 500mb image copy then one your running off of while in the OS that can write to the drive. Now there are A LOT of technical things that can come into play here but I'm going to keep it simple for now. You do not need to boot the other image so if you have the space to do this trick but only one partition do this... if your BeOS PE is at c:\BeOS copy the image.be to your desktop in the OS your using to write to the file system. I'll stick to windows stuff for most descriptions but it should be easily understood by any one coming from Linux as well.

Now you have 2 image.be's one to run off of & one to make your install. If you do not have the space to do this then you may end up with some tricky stuff going on.(See Swap killer). If you don't have the room for the 2 image.betrick set up your running install how you like & add what you want to be intergrated & not an option later. Now when you boot your BeOS PE system open a Terminal... now cd to your desktop in the other OS. For Windows 98 users I belive this will be something like (we'll call the win98 drive win98 but remember your drives name may be different & you must adapt this to your system)

Windows 9x would be:

cd win98/windows/desktop

Windows 2000 would be

cd win2000/documents\ and\ settings/"your_profile"/desktop

Remember that each space must have a backslash before it & BASH does not use c: or d: for drive names as instead it uses volume lables (names) to denote each drive. Now you should be where your image is. Let's keep this simple so on your desktop in BeOS make a folder called "m". You can do this a few ways but just right click your desktop & go new>folder then name it. (remember BASH is POSIX - this means capitalization matters. Make sure you pay attention to case or your going to get lost fast. Now back in your Terminal type:

mount Be.img ~/Desktop/m
Now when you click the folder named "m" you will see Tracker open an empty drive with nothing but a home directory in it. Now you will simply want to open up your boot volume & copy your beos, home, develop, preferences, apps from your boot volume to your now empty BFS image. Once the coping is done we can...

Adding Options

Now you want to down load all the software you want to add to your install. Sadly you may not get it all on so pick the choice stuff & add all the bonus software to another cd. Basically what you want here is extra software that you can add via the installer when you install off the cd. So basics like your dev tools & a few good time killers. Utilities are your best choices. Later you will Learn how to organize this stuff but think of it like "Ok... If I want a fast install I can choose no extras & it will rip along." "What if I install to a system with a cd burner? I should have a cdr tools option & group" Stuff like that. So you might want to down load certain Internet tools, bin tools & stuff in categories... Extra drivers... what if you have 3 or 4 computers... Well why not create a driver subcategory where you can add special drivers for each system. One of your systems has a Radeon... another a Nvidia card... etc etc... you can choose your drivers when installing for each hardware config. Some people would rather just add them to the system so then it's ready to adapt to any new hardware you add. That's a good idea too. It's your cd Organize it how you want! Now I hope that buy the time your done reading this bit of thought provoking info your downloads are done or you have at least figured out what your going to add. When that's done your going to start the dirty work. Uh & I mean dirty!

Time Killer

Now we are on to the time consuming part. Now the software you have chosen will probably be in a number of formats, Zip's, PKG's & possibly others. For this part you are going to have to understand quite a lot about how this is going to work. The first thing to know is how each piece of software you want to add is installed & configured. I will use a few common pieces of software for example. First let's discuss adding BeShare to your cd. BeShare is rather simple. You unzip it & can put it where ever you want. Now here are some catches that can make this a big deal. First off you need a brief idea about how the installer will use your additional software & then it will start to become clear why aspects of your chosen software need to come into play.

It goes much deeper then this but for now we will simply look at directory order. If you have seen or own a BeOS pro cd you will notice a folder called _packages_. This is an ordinary folder but contains some sneaky tricks inside, but as I said we will stick to order for now. For all software you will need a folder called _packages_ & inside that folder for now, one called BeShare. Now don't jump ahead! If you put your BeShare files in that folder it's not going to work! This folder will become a flag folder... I'll explain more later but think of it as basically /boot/.

So what is inside boot on a normal Be system - home - beos - apps - develop - preferences - So that's what you need under the BeShare folder. Now this can become a big project or stay simple. If you just want BeShare it's an easy task & also if you want the documentation as well but you can also take it a step further for organizational sakes. Going simple means in your BeShare folder you will have 2 sub folders. One called apps & another called home. In the apps folder you will put the BeShare folder containing the application in it. Note all you need is the BeShare.x86 or BeShare.ppc depending on what your running. No other folders or files are needed. So now if you have gotten this far you may start to see how this will work.

Also while this will work once you've added the tricks later it's missing one thing... a shortcut!!! That's where the home directory comes in. Make a symlink to the BeShare you chose & keep it near by. (Note the symlink must be from a BeShare.XXX IN the end install location. So if you need to put your BeShare folder & application in your apps directory for a min do so - make the symlink & now its linked to boot/apps/BeShare/BeShare.x86 or ppc. Failure to do this will result in a broken symlink when installed) Now in the home directory you created in _packages_/BeShare/home add a folder called config & in config another called be. Then in be folder create yet another folder called Applications - now put your BeShare symlink in that folder. Now when you install BeShare via the installer it will also add the handy dandy symlink to your applications menu.

Now if you organize your Be menu into sub categories like net tools, applications, music, etc then make sure you take that into account adding the necessary sub directories (_packages_/BeShare/home/config/be/netStuff/symlink) By now I hope you see how you must set up each piece of software. Now there are a few other things to take into account. BeShare is easy but it can go much deeper & take a lot of time. Let's say you now want to add the documentation from BeShare but to your BeOS documentation folder. You will now have to add more to your BeShare set up. sub directories that will end up looking like this...

_packages_/BeShare/beos/documentation/BeShare

Now the BeShare folder at the end of that will have all the documents for BeShare in it. So now with this in mind you have to also take into account custom settings you want added on install or possibly a PKG file installs a host of libraries to you lib & bin directories. You would have to extract all these files & move them to _packages_/NewApp/home/config/bin/ or if you need custom settings on install lets say your dead set on your BeShare name & want all your BeShare settings intact on every installs... you would have to add this to your BeShare folder _packages_/BeShare/home/config/settings/beshare_settings & _packages_/BeShare/home/config/settings/beshare_user_key. Now if you have added the documents this means you now have _packages_/BeShare & in this top BeShare directory you now have sub folders called "home" "apps" & "beos" The apps folder will have the BeShare folder housing the application in it. The home directory will have the config/settings/ & the /be/symlink while the beos folder will have the /documentation/BeShare. This can become A LOT of work for each application & takes a lot of time to make sure you have all the libraries & files each app needs to run correctly.

Tips & Tricks

Now on to how it works...

The installer uses attributes to group the software in the _packages_ folder. Normally you could use Quickres to edit this but it has a tad of a disliking for working on directories... Cometh The Tricks... So since Quickres won't let you work on the directories you must work around this. Now as I mentioned before the BeShare folder in _packages_ will become a "Flag" folder. So remember EVERY folder below _packages_ are flag folders. They are looked at by the installer as /boot/ & will have special attributes. Now how do you work around this you say? Open Quickres ( If you have the dev tools installed you have quickres already in /boot/develop/tools/experimental/Quickres or you can download it at: http://www.bebits.com/app/1504 ) & just go save it to your desktop - it will be a blank file - call it "template" Now while still in Quickres you will need to add new attributes to it. it should look like this


type  id    name				data				

bool  attr  INSTALLER PACKAGE: ON_BY_DEFAULT	false or true
bool  attr  INSTALLER PACKAGE: ALWAYS_ON	false or true
cstr  attr  INSTALLER PACKAGE: DESCRIPTION	What this does
cstr  attr  INSTALLER PACKAGE: NAME		ex. BeShare
cstr  attr  INSTALLER PACKAGE: GROUP		ex. Net Tools
long  attr  wrap				1
long  attr  be:encoding				65535
long  attr  alignment				0
long  attr  _trk/windwkspc			2
mims  attr  BEOS:TYPE				application/x-vnd.Be-directory
offt  attr  INSTALLER PACKAGE: SIZE		size in bytes
rawt  attr  styles
rawt  attr  _trk/xtpinfo_le
rawt  attr  _trk/pinfo_le
rawt  attr  _trk/columns_le
rawt  attr  _trk/viewstate_le
rect  attr  _trk/windframe			(107,44)-(567,235)

Now some of those are just for a normal folder but best to have them all. Most fields are self explanatory & if you don't know what it is don't mess with it because it's not too important. The INSTALLER's are the important guys. The on_by_default means it is pre-selected as a default package to install - always_on means you can't un select it... It's pretty obvious & be sure to make groups. One thing to mention is Quickres is experimental & does not always co-operate. You will find most fields edit ok but other when you double click them will open the dialog box & after you have entered the data you wish to change & hit enter it simply reverts. For those fields you must click on it twice & rest your mouse over the field like you would waiting for bubble help.

After a second or so it will become editable in the window & not in a pop-up dialog box. Once you have made this template you will want to do a copyattr in your Terminal. So now lets say you are adding Mozilla, BeShare, & CL-Amp to your install. In template you would change the attributes in template to reflect Mozilla's size, description, & other things noted & if you want it selected by default & it's group. Then when your done in your Terminal you would type copyattr template ~/Desktop/_packages_/Mozilla. (Note if you have closed your Terminal you will need to cd back to the directories you are working in.) Now the Mozilla folder has all the attributes the Installer needs to display it as a software option at install now repeat this for BeShare & then CL-Amp.

Testing

Now hoping that you have made it this far & assembled many things for your install, move the _packages from where you where working on it to the root of the image or drive. So the root of your ISO should be _packages_ - beos - apps - home - develop - preferences. Once the move is done run the installer on the volume you are turning into the install & see what it lists for options & make sure the sizes names & descriptions are correct. If all seems satisfactory burn it. If you have lots of drive space & a few extra partitions you may just want to install it to another partition from the created install to test it & make sure all programs work & all links are correct... There is a lot of logic, in depth consideration & fore sight needed when doing these setups & you may find you end up with a few mistakes. At worst you will end up with a few coasters unless you really screw'd up.

Burning

All right the time has come to make this thing a reality. I'll cover the windows method for now & possibly add to this tutorial later. I would hope that you have added the IDE replacement drivers as a SYSTEM replacement & if you have down load the boot image for it. (http://www.bebits.com/bob/11639/IDE_boot_image_v0.5.zip) Now in NERO create a new bootable cd & select the floppy.img you just down loaded. If you haven't installed the updated IDE drivers then you will want to use the floppy.img in your BeOS PE folder for your boot image. Once you have selected your boot image burn the cd but DO NOT FINALIZE IT! Once the boot image is done being burned from the NERO menus select file> burn an ISO. Now navigate to your BeOS directory & the image you set up to burn. We called it Be.img in most the examples above but you may have called it something else. Now once you have selected your image as the ISO to burn make sure your using a block size of 1024 & this time finalize the cd... Enjoy

- Jess Tipton

SWAP KILLER

If your stuck on the 500mb partition & have little ram BeOS will have created a swap file. This will steal much needed space. In this event you can try a risky attempt & disable your swap & regain the space to work with. While I encourage removing the swap file it's risky unless you have a decent amount of ram & if BeOS has made a swap on the 500mb partition your not really running with enough ram to qualify. The end result is the system will lock up when you run out of ram & that will hinder your success. I suggest installing ProcessController (http://www.bebits.com/app/313) & watch your ram usage to be safe. To disable the swap you will want to first open your VirtualMemory preferences panel. That is all now close it - opening it creates the file you need if you have never opened it before. Now in /boot/home/config/settings/kernel/drivers/ you have a file called virtual_memory. Open it & change the line "vm on" to "vm off" save & exit (You do not have to change the size. Now open StyledEdit & for good measure save a text file named "stop_swap_nagging" to your /boot/home/config/settings directory - type anything you want in the text file as long as its named "stop_swap_nagging". Now reboot & when you have booted again open a terminal & type:

rm /var/swap

Watch that ram usage & move on... do one thing at a time to not over whelm your ram resources. Just changing a wallpaper with 64mb of ram & no swap will take your system down so move slow.