Grub v0.97 "Unknown partition table signature" - Page 1
Forum section: electronics / general

author: DiTBho
author_rank: Super Contributor
timestamp: March 05, 2024, 07:58:42 pm
content: mac-mini/x86, in "PC" compatibie mode (not EFI).Code:# grub-install /dev/sda1Unknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureUnknown partition table signatureInstallation finished. No error reported.This is the contents of the device map /boot/grub/device.map.Check if this is correct or not. If any of the lines is incorrect,fix it and re-run the script `grub-install'.(fd0) /dev/fd0(hd0) /dev/sda(hd1) /dev/sdb(hd2) /dev/sdc(hd3) /dev/sddhas anyone ever seen this error message? I don't get what is wrong, and how to fix it

author: DiTBho
author_rank: Super Contributor
timestamp: March 05, 2024, 08:03:48 pm
content: Code:grub> root (hd0,0)Filesystem type is ext2fs, partition type 0x83grub> setup (hd0)Checking if "/boot/grub/stage1" exists... yesChecking if "/boot/grub/stage2" exists... yesChecking if "/boot/grub/e2fs_stage1_5" exists... yesRunning "embed /boot/grub/e2fs_stage1_5 (hd0)"... 18 sectors are embedded.succeededRunning "install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeededDone.grub>this is ok, but doesn't fix the problem

author: DiTBho
author_rank: Super Contributor
timestamp: March 05, 2024, 08:44:36 pm
content: Code:boot_drive="hd0"boot_bpart="0"menuconfig="menu.lst"bootconfig="grub.conf"device_map="./device.map"echo "-[device map]--------------------------"cat $device_mapecho "---------------------------------------"cp $bootconfig $menuconfiggrub --batch --boot-drive="($boot_drive,$boot_bpart)" --config-file="$menuconfig" --device-map="$devicemap" <<EOFroot ($boot_drive,$boot_bpart)setup ($boot_drive)quitEOFCode:-[device map]--------------------------(hd0) /dev/sda---------------------------------------Probing devices to guess BIOS drives. This may take a long time.Unknown partition table signatureUnknown partition table signatureGNU GRUB version 0.97 (640K lower / 5120K upper memory)[ Minimal BASH-like line editing is supported. For the first word, TABlists possible command completions. Anywhere else TAB lists the possiblecompletions of a device/filename. ]grub> root (hd0,0)Filesystem type is ext2fs, partition type 0x83grub> setup (hd0)Checking if "/boot/grub/stage1" exists... yesChecking if "/boot/grub/stage2" exists... yesChecking if "/boot/grub/e2fs_stage1_5" exists... yesRunning "embed /boot/grub/e2fs_stage1_5 (hd0)"... 18 sectors are embedded.succeededRunning "install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeededDone.grub> quit

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 06, 2024, 04:19:13 am
content: What partition table format are you using? gpt?fdisk -l /dev/sdaWhat is the partition table signature?dd if=/dev/sda bs=1 skip=510 count=2 status=none | od -A none -t x1If not "55 aa", there you go. How did you create the partition table in the first place?

author: DiTBho
author_rank: Super Contributor
timestamp: March 06, 2024, 12:42:50 pm
content: Quote from: Nominal Animalit's an old PC-partition scheme, older than GPT.Code:# fdisk -l /dev/sda[fdisk -l /dev/sdaDisk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectorsDisk model: FUJITSU MHZ2120BUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x00000000Device Boot Start End Sectors Size Id/dev/sda1 * 2048 1959929 1957882 956M 83/dev/sda2 1959930 3919859 1959930 957M 82/dev/sda3 3919860 234441647 230521788 109.9G 83Code:# dd if=/dev/sda bs=1 skip=510 count=2 status=none | od -A none -t x155 aaQuote from: Nominal AnimalI had already checked with a hex editor, the signature seems ok, as does the MBR (which is the Grub stage1).The disk is installed inside an old Apple-mini/x86 (intel core2 duo), and was created years ago with fdisk. It worked fine, until I compiled a new linux kernel, moving from v4.9.16 to v6.6.8, and upgraded Grub from Grub-v1 to Grub-v2 since the new gentoo stage4 no longer uses Grub-v1.Code:=sys-boot/grub v2.12-r1Grub-v2 was compiled with GRUB_PLATFORMS="pc", however "grub-install /dev/sda" with the old grub.conf file didn't work and made the system unbootable.Code:GRUB_PLATFORMS="pc"# coreboot# efi-32# efi-64# emu# ieee1275# loongson# multiboot# pc <------------- old PC booting scheme# qemu# qemu-mips# uboot# xen# xen-32# xen-pvh(grub-v2 profile)Code:# hd0,0 is /dev/sda1# hd0,1 is /dev/sda2# hd0,2 is /dev/sda3# Boot automatically after x secs.timeout 30# By default, boot the entrydefault 2# Fallback to the entry.fallback 1#-----------------------------------------------------------------------# ID=0title memory testroot (hd0,0)kernel /kernel/memtest86#-----------------------------------------------------------------------# ID=1title kernel-4.9.16 (stable, for production)root (hd0,0)kernel /kernel/kernel-4.9.16.bzImage root=/dev/sda3 CONSOLE=/dev/tty1#-----------------------------------------------------------------------# ID=2title kernel-6.6.8 (new, to be tested)root (hd0,0)kernel /kernel/kernel-6.6.8.bzImage root=/dev/sda3 CONSOLE=/dev/tty1(grub.conf)So, I booted from a USB stick, unmerged Grub-v2, and binary packaged Grub-v1 from another Gentoo x86/32bit machine with same the profile, just >8 years older, and emerged it as binary.Code:boot/grub/stage1boot/grub/stage2boot/grub/e2fs_stage1_5boot/grub/fat_stage1_5boot/grub/ffs_stage1_5boot/grub/vstafs_stage1_5boot/grub/xfs_stage1_5boot/grub/defaultboot/grub/grub.confboot/grub/splash.xpm.gzboot/grub/stage2_eltoritosbin/grubsbin/grub-installsbin/grub-terminfosbin/grub-md5-cryptsbin/grub-set-defaultusr/share/info/grub.info.bz2usr/share/info/multiboot.info.bz2usr/share/grub/splash.xpm.gzusr/share/man/man1/mbchk.1.bz2usr/share/man/man8/grub.8.bz2usr/share/man/man8/grub-md5-crypt.8.bz2usr/share/man/man8/grub-install.8.bz2usr/share/man/man8/grub-terminfo.8.bz2usr/share/doc/grub-0.97-r10/NEWS.bz2usr/share/doc/grub-0.97-r10/TODO.bz2usr/share/doc/grub-0.97-r10/AUTHORS.bz2usr/share/doc/grub-0.97-r10/grub.conf.gentoo.bz2usr/share/doc/grub-0.97-r10/grub.conf.sample.bz2usr/share/doc/grub-0.97-r10/THANKS.bz2usr/share/doc/grub-0.97-r10/README.bz2usr/share/doc/grub-0.97-r10/BUGS.bz2usr/share/doc/grub-0.97-r10/ChangeLog.bz2lib/grub/i386-pc/ufs2_stage1_5lib/grub/i386-pc/jfs_stage1_5lib/grub/i386-pc/minix_stage1_5lib/grub/i386-pc/stage2lib/grub/i386-pc/e2fs_stage1_5lib/grub/i386-pc/vstafs_stage1_5lib/grub/i386-pc/iso9660_stage1_5lib/grub/i386-pc/ffs_stage1_5lib/grub/i386-pc/stage2_eltoritolib/grub/i386-pc/fat_stage1_5lib/grub/i386-pc/xfs_stage1_5lib/grub/i386-pc/reiserfs_stage1_5lib/grub/i386-pc/stage1bin/mbchk(=sys-boot/grub-0.97, binary packaged, content)Grub-v1 made the system bootable again, but complains about that signature, which makes no sense as the signatures { 0x55 0xaa } seem correct

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 06, 2024, 05:16:52 pm
content: Quote from: DiTBho on March 06, 2024, 12:42:50 pmYep, old DOS partition table format, just like on e.g. most USB sticks with more than one partition. Nothing wrong with that.Obviously it seems to work, the only thing is the error message, and whether it means anything.Perhaps the unused fourth partition has some garbage left over? You could create it, save it, then delete it, and save again (usingfdisk /dev/sda). The old DOS partition table format supports exactly four "primary" partitions, although the last of them can be an "extended" partition containing additional "secondary" partitions.However, for me, the next step would be to rungrub-install --debug /dev/sdausing the grub-0.97 grub-install –– it is a shell script, a binary in later versions –– to better see what actually generates the warning. This way, the bash script runs inset -xmode, displaying each command as it runs them. After that, rundmesgto check if kernel generated any of the warnings.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 06, 2024, 09:24:47 pm
content: Quote from: DiTBho on March 06, 2024, 12:42:50 pmCould this be an endianness issue? Maybe related to an incorrect configuration of the grub build?

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 06, 2024, 09:50:22 pm
content: Quote from: SiliconWizard on March 06, 2024, 09:24:47 pmIt's an x86-based mac mini, with grub-0.97 only supporting x86 (parts written in assembly). Intel little-endian all the way. (That's also why the signature constant PC_MBR_SIGNATURE is written as 0xaa55 in grub-0.97/stage2/pc_slice.h.)In grub-0.97, (stage1/1.5/2), a dos partition table signature mismatch should yield a "Partition table invalid or corrupt".To overwrite the signature, one could run (Bash or dash)sync ; LANG=C LC_ALL=C printf '\xaa\x55' | dd of=/dev/sda bs=1 seek=510 count=2 ; syncbut I think this will just stop booting at stage2 with the "partition table invalid or corrupt" error. Reverting to the normal one is of coursesync ; LANG=C LC_ALL=C printf '\x55\xaa' | dd of=/dev/sda bs=1 seek=510 count=2 ; sync

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 03:28:24 pm
content: the situation here is terrible, and continues to get worse.grub-v2 ... I have no idea what damage it did but it even damaged the ext3 filesystem as I found the first 13Kbyte of the partition filled with 0xAA, as if it had written to it at low level.Ext3 isn't too tolerant of this sort of thing, so I made backups before unmount it, and then wiped out the entire diskCode:dd if=/dev/zero of=/dev/sda(the machine booted from the usb-stick, so I can do it on the disk)Created a PC partition from scrath (fdisk /dev/sda), formatted /dev/sda4 as ext4, and installed Lilo.But now the firmware no longer recognizes the disk as bootable and I no longer hear the bootstrap sound, and worse still, it worked (not the past verb), now, without holding down (Option-key on a mac-keyboard) ALT(ALT-key on a PC keyboard) during startup, the Mac seems to go crazy and doesn't even see the USB stick with the EFI installer inside.Holding on the Option/Alt key at the bootstrap forces the mac to list all the bootable devices.Surprise, the USB stick is listed, but the harddrive is reported as ... blankWHATTHEFSK!!!I've already tried everything, including cleaning the stroller areaThe absurd thing, I have a stack of other 8 intel mac-minis - unfortunately they are not mine - none of them behave this way!And I've already finished installing both Lilo and Stage4 on all 8, cloned via netcat.They boot perfectly (incremental IP and hostname=node0..7 -> ip=192.168.1.130...137), and they do boot, a clear sign that the procedure followed is correct, and that lilo works!Why on the why the only unlucky Mac is mine?!?

author: madires
author_rank: Super Contributor
timestamp: March 08, 2024, 04:10:29 pm
content: Quote from: DiTBho on March 05, 2024, 07:58:42 pmUsually grub is installed in the MBR, e.g. /dev/sda (disk, not some partiton). It's only installed in a specific partition if there's already some bootloader from another OS in the MBR and you don't want to replace it with grub.

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 04:40:16 pm
content: Quote from: madires on March 08, 2024, 04:10:29 pmThat was how Grub-v0.97 was installed: on the MBR!I cleaned the first 448 bytes of /dev/sda, and installed Lilo from scratch on a fresh empty MBR, but it did not help.Today also I found that "something" "somehow" wrote 13Kbytes of { 0xAA, 0xAA, ... } to the rootfs partition on the ext3 filesystem structure, which seems strange, but that's what I saw.There should be no malware - yup, GNU/Linux is not safe from them - as that mac has never executed nothing but GNU/Linux and has never been used to surf the net, and all it did was compile both Gentoo and development sources.I wonder why the other eight Mac-intel-s (exactly the same model) boot Lilo and this bloody Mac does not even recognize the disk as bootable?!?I cloned exactly *THE SAME* setup, so, at least holding the Option/ALT-key should list the disk in the bootable device list. But again no-dice.And it's also weird that I don't I hear the "chime sound" from that bloody Mac. Already tried to "clean the PRAM", but again no-dice.This sounds1) Firmware curruption, is the flash degraded? Who knows ...2) the PRAM battery is goind to die, but it's not exaxtly already died, walking dead. Who knows.3) ...?!?umm, I also tested the disk with badblocks && S.M.A.R.T. : all ok

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 06:39:57 pm
content: opened, thanks to the above video.

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 06:56:06 pm
content: dead cdrom, labelled Apple, doesn't have a standard sATA connector. Umm, probably custom. It does not read anything, and makes weird noice when you insert a CD. The Linux kernel (v6) gets nuts when you try to read something -> to be replaced? rapaired? mumble ...the PRAM battery is a CR2032 and the voltmeter measures 3.1V -> looks goodthe harddisk is labeled "Apple", attached to my HPPA workstation is fully recognized, so it's a standard sATA disk. Installed inside a usb-sATA box, all the other mac-mini-intel-s can see in the of bootable device, just "not EFI", that's correct, as it has a "DOS-partition scheme" and LILO as MBRthere are two so-dimm ram sticks. Ummm, 2GB each, that's weird as it should be 4GB total, whereas the Linux kernel (64bit) sees 2GB --> is one of them damaged? Was it the RAM that corrupted 13Kbyte on the disk?!? and does it cause all the problems?!? to be checked ...

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 07:03:14 pm
content: Meanwhile, found it in a local market, I went to get it immediately, so I bought a mac-mini/intel-2009 to replace mine.And I installed 2x4GB on it!it's based on Intel(R) Core(TM)2 Duo CPU, P7550@2.26GHz, so ~+300Mhz faster than my old gear! That's good!Code:# uname -r6.1.7-macmini64# cat /proc/meminfoMemTotal: 7860856 kBMemFree: 7772188 kBMemAvailable: 7737848 kBCode:# liloReading boot sector from /dev/sdaUsing TEXT secondary loaderCalling map_insert_dataMapping message file /boot/lilo-message.txtCalling map_insert_fileBoot image: /kernel/kernel64-6.1.7.bzImageAdded k6.1.7/64bit *Boot image: /kernel/kernel32-6.1.7.bzImageAdded k6.1.7/32bitWriting boot sector.it only writes 448 bytes and nothing else on /dev/sda, as expected

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 08, 2024, 08:03:47 pm
content: Before you install it, wipe it (by writing zeros to the first and last megabyte of the storage device), then create a new partition table and partitions using fdisk/sfdisk/etc., and only then install grub/lilo.As you well know, it is best to keep the /boot partition as ext2, and by default mount it read-only in the OS if possible (it is not possible if you use/need e.g. automated kernel updates). That way the / partition can use any filesystem the kernel supports.In theory, some of the issues you're seeing could be due to interactions with LVM2, as in configured to be used with automagic scanning, but doesn't see anything. Brutally clearing the first and last megabytes of the storage device is the big hammer for that (and all other partition table and partition scanning stuff).As to the malfunctioning one, I think it has severe hardware issues, possibly in the internal controller of the misbehaving disk. The replacement of data with 0xAA = 10101010₂ is a tell-tale sign of that, unrelated to the partition table signature.

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 10:23:13 pm
content: Quote from: Nominal Animalthat's why I dd if=/dev/zero of=/dev/sda, but it didn't helpQuotethe problem is ... which part is malfunctioning+ hdd?+ ram?+ motherboard?In my spare time, I'll try to understand it, but I have to resolve the issue as soon as possible to finish a project.Today I spent 80 UKP for a late 2009 Apple Mac Mini Intel Core2 Duo@2.26GHz, 500GB HDD, and 20 ULK for a 2x4GB ram kit+ 080UKP Mac Mini+ 020UKP ram kit= 100UKP totalTempted to pick up a second late 2009 Apple Mac Mini Intel Core2 Duo, but+ 2.53Ghz+ 8GB of ram already installedlisted for 120 euro shipped

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 10:29:28 pm
content: It seems the CDROM is a weak components in Intel Mac-Mini. I see that many mid-late 2009 releases have a dead cdrom.I have never encountered such a high frequency of defects with optical drives used in PowerPC Mac-Mini.

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 08, 2024, 10:37:29 pm
content: Quote from: DiTBho on March 08, 2024, 10:23:13 pmMy main suspect is the HDD internal controller. If you can, temporarily swapping it with something else would be informative.In general, this kind of suspicious and problematic behaviour is not worth the worry if a simple test replacement cannot pinpoint the failure to a specific device one can replace; you'll spend much more time investigating and worrying about it than it is worth spending for, especially if you can get a full replacement device for on the order of 100€ or so.Quote from: DiTBho on March 08, 2024, 10:29:28 pmInteresting. I can understand getting the sensor dirty and not being able to reliably read any media anymore (difficult to clean..), but it seems you're seeing electromechanical failures.Do you happen to have a picture of the connector? I assume you've already excludedslimline and micro-SATAandmSATAas possibilities? The mid-2010 models per iFixIt pictures seem to use custom SATA connectors.

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 10:43:20 pm
content: Quotethis video gives some points to this theory: too much dust can cause malfunctions.It is very dirty because it has never been opened in the last 14 years, it has continued to accumulate dust.The PowerPC version has a different fan, which probably blows it out.

author: DiTBho
author_rank: Super Contributor
timestamp: March 08, 2024, 10:44:14 pm
content: Quote from: Nominal Animal on March 08, 2024, 10:37:29 pmI will take tomorrow

author: Nominal Animal
author_rank: Super Contributor
timestamp: March 08, 2024, 11:13:37 pm
content: Quote from: DiTBho on March 08, 2024, 10:44:14 pmBetter spend the time with careful use of pressurized clean air and a vacuum cleaner!("Hot tip": pantyhose fabric stretched over the plastic intake of a vacuum cleaner makes for an excellent filter, stopping small screws and such vanishing inside the vacuum cleaner. Also useful for finding dropped screws.)

author: DiTBho
author_rank: Super Contributor
timestamp: March 09, 2024, 01:54:43 pm
content: it seems there are special "CD caddy" likethis, allowing you to install a second HDD.Like with theMac-Mini Server?(I've never seen one in person, only seen on the internet: so I doubt they really exist)It just replaces the CDROM unit, so ... it seems the weird "sATA" connector is just a "smaller" version, probably made by Apple.

author: DiTBho
author_rank: Super Contributor
timestamp: March 09, 2024, 04:43:01 pm
content: Code:Mac-Mini Early 2009 Core2/Duo P7350 2.00GHz 4GB NVIDIA-GeForce-9400M-128MB <---- mine, deadMac-Mini Early 2009 Core2/Duo P8400 2.26GHz 4GB NVIDIA-GeForce-9400M-256MBMac-Mini Late 2009 Core2/Duo P7550 2.26GHz 8GB NVIDIA-GeForce-9400M-256MB <---- mine, newMac-Mini Late 2009 Core2/Duo P8700 2.53GHz 8GB NVIDIA-GeForce-9400M-256MB <---- my boss'sMac-Mini Late 2009 Core2/Duo P8800 2.66GHz 8GB NVIDIA-GeForce-9400M-256MBMac-Mini Server Core2/Duo P8700 2.53GHz 8GB NVIDIA-GeForce-9400M-256MB (wanted)I carefully cleaned and removed all the dust, but it seems the firmware is corrupted.I know the firmware can be updated, but ... I have enough: for me it'sdeadand it will be replaced with a second faster unit.R.I.P.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 09, 2024, 09:28:59 pm
content: Damn, using Intel-based Mac minis from 15 years ago, especially when one despises Intel CPUs, is intriguing.

author: DiTBho
author_rank: Super Contributor
timestamp: March 10, 2024, 01:25:47 pm
content: Quote from: SiliconWizard on March 09, 2024, 09:28:59 pmThat's why I won't throw the metal case of the dead Mac-mini in the trash: to be re-used as case for a MIPS board!!!Mips32R2/be-mini, running Haiku,sweet dreams are made of this... unfortunately I have to use those things (which I personally hate) for a lot of different reasons.Starting from, because I don't have the CAD/CAM skills (and I'm paid for it anyway) to re-design rack cases for mac-mini/Intel (>2010) or Apple Silicon (similar, from the mechanical point of view, rack kits are compatible), and I have to stock up to eighth of those Apple intel Mini 2009 in a kind of cluster in a rack-case, and I have use x86 (intel core2/Duo @ >=2GHz is enough for the specs) because there are commercial applications (including C compilers) with which they are supplied only the binaries, among other things in 32bit ... so I also have to instruct Catalyst to build a "multi library" stage4, hybrid 32 and 64bit, with a 64-bit kernel to be able to address all 8GB of RAM, which is required for two QEMU/x86 VM.So, if it was for my personal stuff, I would buy an Ampera 128Core workstation and/or a POWER workstation, for sure not that x86 stuff.

author: DiTBho
author_rank: Super Contributor
timestamp: March 10, 2024, 01:29:36 pm
content: (then it must also be said: I have no authority to tell my boss or my clients to throw everything awaywhich would also make a lot of sense, but these are decisions that are not my responsibility)

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 11, 2024, 08:15:04 am
content: Quote from: DiTBho on March 10, 2024, 01:25:47 pmQuote from: DiTBho on March 10, 2024, 01:25:47 pmAmpera stuff is very expensive.