Login  •  Register


The time is now: Wed Aug 21, 2019 10:24 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 9 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Tue Jan 29, 2019 2:02 pm 
Offline
Space Cadet

Joined: Wed Dec 12, 2018 5:38 pm
Posts: 4
Hi,
I realise I am unclear about the best way to check for and fix any disk errors that might be found in the SS emulated world.
I have been using Edwards ready built 64bit SS based MacOS9 and moved my databases in there from ChubbyBunny where they had been for some years.
I was looking into the sparse bundle and backups of my MacOS9 configuration and noticed there seemed to be some errors, maybe, in the bundle. Working on backups I tried various things to investigate and maybe fix.

First major choice was to do it from within OS9 using a number of Apple or 3rd party tools I have used over the centuries (starting in 19xx). Well I started in host MacOS 10.11 since this is where I want to copy and preserve my data and figure I have the latest tools especially if I end up need AFPS etc in the mix (where i am also making moves towards moving to Mojave if I can assure myself on a few points first...)

I had been moving a fair bit of files around in the OS9 virtual system drive, and it seemed a good idea to look at empty trash and maybe "hdiutil compact" the host sparse image at
/Applications/MacOS9/Mac\ OS\ 9.app/Contents/Resources/Files/MacOS.sheepvm/MacOS9.sparsebundle
(FIRST MAKING SURE SS/MACOS 9 WAS CORRECTLY EXITED)
I got a first worry with the response:
Starting to compact…
Reclaiming free space…
hdiutil: compact failed - internal error

SS/ OS9 still runs up OK... a bit of research leads me to try
hdiutil attach -nomount -noverify -noautofsck <the MacOS9.sparsebundle>
that produced:
/dev/rdisk4s2: fsck_hfs started at Tue Jan 29 12:49:22 2019
/dev/rdisk4s2: /dev/rdisk4s2: ** /dev/rdisk4s2 (NO WRITE)
/dev/rdisk4s2: Executing fsck_hfs (version hfs-305.10.1).
QUICKCHECK ONLY; FILESYSTEM CLEAN
/dev/rdisk4s2: fsck_hfs completed at Tue Jan 29 12:49:22 2019

Not much else going on so run up ElCap's Disk Utility, see the container drive, see the active MacOS9 volume within it and so run Repair/Check on that:
/dev/rdisk4s2: fsck_hfs started at Tue Jan 29 12:52:39 2019
/dev/rdisk4s2: /dev/rdisk4s2: Executing fsck_hfs (version hfs-305.10.1).
/dev/rdisk4s2: ** Checking non-journaled HFS Plus Volume.
/dev/rdisk4s2: The volume name is MacOS9
/dev/rdisk4s2: ** Checking extents overflow file.
/dev/rdisk4s2: ** Checking catalog file.
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: Invalid BSD file type
/dev/rdisk4s2: ** Checking multi-linked files.
/dev/rdisk4s2: ** Checking catalog hierarchy.
/dev/rdisk4s2: ** Checking volume bitmap.
/dev/rdisk4s2: ** Checking volume information.
/dev/rdisk4s2: ** Repairing volume.
/dev/rdisk4s2: ** Rechecking volume.
/dev/rdisk4s2: ** Checking non-journaled HFS Plus Volume.
/dev/rdisk4s2: The volume name is MacOS9
/dev/rdisk4s2: ** Checking extents overflow file.
/dev/rdisk4s2: ** Checking catalog file.
/dev/rdisk4s2: ** Checking multi-linked files.
/dev/rdisk4s2: ** Checking catalog hierarchy.
/dev/rdisk4s2: ** Checking volume bitmap.
/dev/rdisk4s2: ** Checking volume information.
/dev/rdisk4s2: ** The volume MacOS9 was repaired successfully.
/dev/rdisk4s2: fsck_hfs completed at Tue Jan 29 12:52:39 2019

Sounds OK but now that copy will not start-up fully, flashing floppy icon and must force quit.

SO MY QUESTIONS?
What is the "best way" to delete files and tidy up / back up the config?
What are the ways and consequences of the various ways of looking at the disk drive?
In the event of corruption / data loss etc what is the best way to move forward?

Thanks for your time and hope this helps more than just myself!


Last edited by cwinte on Wed Jan 30, 2019 11:27 am, edited 1 time in total.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jan 29, 2019 6:48 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2668
Location: Emaculation.com
Having similar configurations, this is what I do:

I run Disk First Aid from within OS 9 after emptying the trash.

I use my sparserbundler script instead of compacting the sparse bundle (sparserbundler creates a new sparsebundle with 2mb partitions instead of using the compact flag -- the result is the same, but creating a new one means the old one's still there if something goes wrong).

I use Time Machine to back up the sparse bundles, so I can roll back to the previous known-good version when needed.

Using this approach, I haven't had a permanently fatal situation since I started using sparse bundles (back in 2011?).

When attempting repairs or tweaks, always start from the inside and work your way out; and ALWAYS back up and run Disk First Aid before compacting an image.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 4:15 am 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1070
A few weeks ago I had exactly the same problem reported by cwinte - I was updating the MacOS9 app and found disk corruption in the copy I was using, and tried fixing it by various method - and the High Sierra disk utility produced exactly the same unbootable disk image.

I restored from a backup, and used the Sparsebundler app (as described above) to compress the image.

As reported in the first post, I had a disk image that booted correctly and the only problem I saw was when I tried to compress it and couldn't - and then I tried using Disk Utility to fix it, and got the unbootable image as a result.

EDIT: And I see that hdiutil compact fails with a freshly-made disk created by the SparserBundler app, so there seems to be something wrong with hdiutil, not with the disk image.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 10:52 am 
Offline
Space Cadet

Joined: Wed Dec 12, 2018 5:38 pm
Posts: 4
That test of a fresh image reporting problems sounds VERY worthy of further investigation by someone who really knows what is going on and needed, for now and future AFPS etc.
I did wonder if the issue I saw was there from early on or I had introduced it somehow.
I strongly feel we need an image system that can handle removal of files and trimming down the sparse image size, though I will take steps to minimise file deletion on the system image from now on (at least until I know this is resolved!)...

I'd really like to smooth out this sort of issue as I need and expect to run my very old accounts database in this environment for 10 years or more, and thus onward into the pure 64 bit world... My data goes back to 1994 and l would like to keep it rolling along!

Any ideas about how/who to push this along with?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 11:23 am 
Offline
Space Cadet

Joined: Wed Dec 12, 2018 5:38 pm
Posts: 4
adespoton wrote:
I use my sparserbundler script instead of compacting the sparse bundle (sparserbundler creates a new sparsebundle with 2mb partitions instead of using the compact flag -- the result is the same, but creating a new one means the old one's still there if something goes wrong).
....


Sounds good to look at but only found 1 other ref in the forum and no link to it... (feel like I should have turned it up) can you give me URL or clue? [apologies if I missed something obvious]


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 12:55 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1070
I should have made clear that hdiutil compact fails on a fresh sparsebundle made from an existing disk from the MacOS9 system, using the SparserBundler utility to create the disk. So there may be something wrong with that disk image that I don't know about.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 5:41 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2668
Location: Emaculation.com
The difference in methods here is that if you use hdiutil compact, it attempts to move data around on the original image to free up slack space for compression; sparserbundler instead uses hdiutil to create a new sparse bundle with small slice files, so data doesn't need to be moved around; instead, any part of the original image containing a 2MB chunk of slack space just won't be written out.

So if something in the partition map is wonky, compacting the original image will break it, but converting it to a 2MB slice sparsebundle will preserve the partition layout as it is and just drop the bits of the drive that have no readable data on them. This also means that any fragmentation is preserved, which compact will clean up.

If one of you still has an original copy of the drive image and wants to experiment with Norton Utilities to run a repair and defrag inside OS 9, that might reveal what's actually going on here with the original images.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 7:23 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1070
adespoton wrote:
If one of you still has an original copy of the drive image and wants to experiment with Norton Utilities to run a repair and defrag inside OS 9, that might reveal what's actually going on here with the original images.


Norton Disk Doctor (vintage 1999) seems to lock up SheepShaver. Probably it searches for real hardware and doesn't find it.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Jan 30, 2019 8:21 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2668
Location: Emaculation.com
Right; I forgot about that. I seem to recall a tool that successfully worked, but it's probably easier these days to just spin up a new clean and formatted image and copy everything over.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 9 posts ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group