Possible problem with updating Haiku on a usb stick

When running Haiku from a USB stick, the system storage space has been set.
If an software updater is used, one can see the free space lessens. As the space cant be increased it is leaving very little for adding other software.

I did try using installer to install to another USB stick, as I think I read it makes the complete stick available to Haiku…but I couldn’t get that to boot. (I will try that again.)

Anyway my point is - to ensure that the software update doesn’t run out of room as it often seems that updates tend to grow rather than get smaller.

There is a patchset to allow the bfs partition to be resized live, it is untested/not finishef and thus not merged yet.

3 Likes

Excellent…that should sort it.
I wasn’t sure if any one had noticed or not…so all good.

1 Like

Well, that changeset has been in there a long time. : )

1 Like

erm…‘changeset’??
sorry…only had haiku running for a week…so very much finding stuff out.

It’s what we call severall changes in gerrit, our code review tool

1 Like

When updating the system, packages that are replaced, and so no longer in use, are stored in states. This is very convenient because it allows to boot from a previous state if the update went wrong and/or broke something. The drawback, is that it takes place on the media. On an USB disk, this can become a problem. To recover some room, you can safely delete some states (They are folders located in /boot/system/packages/admnistrative.). Never delete them all, as you would break your safety net, keep at least the last five.

3 Likes

oh righty…thanks for the ‘heads up’. I thought Id read something somewhere about deleting to make room. Will check that out.

Ahoy @schip !

There is an application in HaikuDepot to do some housekeeping in a Haiku install.
You can select which area in your install want to purge : temporary files , some browser caches, and also these states as well -

It’s called FliWip

As you can see above - it does not contain all apps that has such cache or temporary files you can selectr, but all Haiku related and apps belongs Haiku closer. e.g. you can find simple Netsurf browser I installedbut not another one : Otter browser.
Also you can select only all Previous system states here, not possible to select which states you may preserv for safety reasons - so be careful ! :slight_smile:
Then can be helpful manual selection of these safe states to remove …

However some changes cannot be undone with safe states - I’ve got run into such change which led such situation it could not be avoided to reinstall to USB from same stick’s Haiku live partition :smiley:

Also you can freed up space with
checkfs /boot command

First run as safely checks as using switch ‘-c’ – that’s only checks the blocks of your BFS filesystem

checkfs -c /boot

it does not do changes in the FS
Without this ‘-c’ switch you enable to do the automatical FS repairs as well.

~> checkfs -c /boot
25651 nodes checked,
0 blocks not allocated,
0 blocks already set,
20722 blocks could be freed

    files           24174
    directories     1040
    attributes      228
    attr. dirs      160
    indices         49

    direct block runs               26793 (5.93 GiB)
    indirect block runs             460 (in 16 array blocks, 1.67 GiB)
    double indirect block runs      0 (in 0 array blocks, 0 bájt)

~>

I highlighted the line which shows how much blocks can be freed as the check shows.
These are blocks which were used by already deleted items. I do not use Trash - so I can free up them sure and as still had not problem in my case I use it time to time.
But honestly – I think about it rather as a BIG GUN - if you really need a bigger chunk of free space in your install and you left out of other removals.
As it had not cause a problem for me yet I am not sure to suggest you - but for using it for your own risk ,-)

Have luck with housekeeping your Haiku !

3 Likes

Wow - Thanks heaps for that, Kit!!!
looks excellent…and is available to beginners.

Tis ok…Im only using Haiku as a usb OS for now…so can easily do a re-install if I muck things up. (Mistakes make a great teacher.)
Gonna try that right now…

that worked remarkably well… could see almost a doubling of free space…so thank you!!

You are welcome !

Happy Easter weekend ! :smiley: (against the cat below - I’m smiling !.. )

1 Like

Ha - reminds of an ad with a cat who knocks stuff off tables.
Oddly enough I think that is a ginger cat too.

ok…so heres the situation:
Had to re-install Haiku on my usb stick. Made the mistake of trying a different browser and that used up the remaining free space.

New install and storage is:
1.10GB used
271.69 MB free

SoftwareUpdater reports:
42 packages to update.
1 new.

After updating:
84.99 MB Free.

Reboot:
131.56 MB Free ie half of the free space has gone on the update.

Its difficult to know if a software addition will wide that out. Ok one can see the size of the package before downloading…but theres often a swag of extras that come down with it. Thats how I got caught out with trying a different browser. It was within the free space size but not with the extras.

Ive tried a number of times making a usb with in Haiku but they dont fire up like an etcher one does…so thought the entire usb stick is available its a no go.

Ive tried install as if the USB stick was a HD but that didn’t work either…but I will try it again and some other ways.

Before I proceed though, I was wondering if the nightly downloads would be a better option…does anyone know if they need an update once installed?

1 Like

another update:
Had forgotten to re-install FilWip.
Got rid of the ‘Previous system states’, freeing 173.66MB.
Haiku info:
289.63MB free.

Yay!!!..a small victory.

1 Like

Are you trying to install on a 2GB stick? That’s won’t be enough for browsers like Gnome Web indeed. You would be more comfortable with a 16GB, that leaves place for working.

ha… the usb stick size is irrelevant as it could be 64GB but the install would be exactly the same. I think it was due to being set up for the days when usb sticks were small. Its not a bug…as everything works but using etcher it is installed that way due not to etcher but the conditions of Haiku ie within 2 GBs. . The remainder of the usb stick is not accessable …so wasted.

The way to get around this is to use ‘Installer’ which makes the whole USB stick available. However I cant get the USB stick to boot if made that way…but Im still trying differnt ways to see if it can work.

New comers will very likely use the etcher made usb stick before deciding to install to a HD …but will find the system testing some wot restricted.

Is there a way to change ‘read only’ files.??
Doesn’t seem to be in the searches Ive done so far.

I want to free up space by deleting the stuff I’ll never use: TV, Vision and Demos.

i think its better to install into other usb drive so it can use full capacity

Dear @schip ,

The size of USB stick is not irrelevant but it is important. You mix up 2 things - seems you have some knowledge and definition confusion.
What you call ‘USB install’ that is only a Haiku Live system that is for try out Haiku and install the Haiku onto whatever media to use.
That is in an image format (ISO) with limited BFS storage space It is because you download it to write onto an optical disc or an USB thumb drive.
Now you have luck on your side as Beta4 is the first ISO image that is 1.4 GB size – nightlies still 700 MB to be able to write to a CD ROM.Not everyone uses Haiku on modern machines or capable to boot from an USB drive.

So when you use Installer that is when you install Haiku onto a USB.

I do not know what you do during the install process which causes that you go back to Haiku Live instead of freshly installed Haiku on the remaing place of the USB stick.

You may do not setup that secondary partition well - or it is GPT formatted drive and then you should configure the BIOS or UEFI conf another way.

You may ask help locally from someone to check your configs and the drive who has more knowlwdge about things under the hood - they must not be Haiku expert but rather PC expert.
I tell you this as the installed Haiku should be detected by bootloader and that should be started from the stick after Haiku installed on it.
You could return to Haiku Live version vith boot options only – after ***** installed* Haiku on it … as that would became the default system partition, not the Haiku Live image and its partition.

Alternate option is
you use a smaller USB stick for the Haiku Live installer image
and use a secondary USB to install Haiku on it – for example this 64 GB thumbdrive.

Have good test installs and final solution !

3 Likes