|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
Power failure and now no boot
This happened before, and I was able to fix it with fsck, but don't remember exactly what I did. Seems like I did post here, before, but can not find the thread or post in any of my posts, so any way, There was a power failure, and now I can not boot.
I did manage to run fsck, on all the other partitions, except c:, some repairs were made, and if my memory is correct, the other time, it was c: that needed repairs, but I can not get it to work. Code:
parrot# disklabel -h sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: HUA721075KLA330 duid: e0f8625185a016ed flags: bytes/sector: 512 sectors/track: 21 tracks/cylinder: 199 sectors/cylinder: 4179 cylinders: 350598 total sectors: 1465149168 # total bytes: 698.6G boundstart: 32 boundend: 1465149042 drivedata: 0 16 partitions: # size offset fstype [fsize bsize cpg] a: 1.0G 32 4.2BSD 2048 16384 12958 b: 3.2G 2097184 swap c: 698.6G 0 unused d: 4.0G 8802336 4.2BSD 2048 16384 12958 e: 9.9G 17190912 4.2BSD 2048 16384 12958 f: 2.0G 37941216 4.2BSD 2048 16384 12958 g: 1.0G 42135520 4.2BSD 2048 16384 12958 h: 10.0G 44232672 4.2BSD 2048 16384 12958 i: 2.0G 65204192 4.2BSD 2048 16384 12958 j: 6.0G 69398496 4.2BSD 2048 16384 12958 k: 500.0G 81981440 4.2BSD 4096 32768 26062 parrot# fsck -f /dev/rsd0 fsck: /dev/rsd0: unknown special file or file system. parrot# fsck -f /dev/rsd0c fsck: /dev/rsd0c: unknown special file or file system. parrot#
__________________
My best friends are parrots |
|
|||
If I understand correctly you've booted on another OpenBSD installation from a USB drive.
From there you can try to mount your partitions to determine which one is corrupted (if the boot message is not providing enough information). From there you can also backup your data. fsck should be used on partitions holding a file system: in your case rsd0a and rsd0d to rsd0k. If nothing of this works, once you have a backup of your data, you can remove your usb drive and boot from bsd.rd (from the boot prompt). Then you can choose to (U)pgrade your system. It's gonna rewrite all the system files leaving your data untouched. You may have to reapply the system paches with syspatch after rebooting. |
|
|||
Writing at the same time as jggimi, once again.
|
|
||||
Ok, there is no error message, when it starts to boot, I do get the "boot> " but then it just shuts down, as if I shut off the PC, it (the PC) then starts again, but never get's any further the the boot> , I see normally when I turn the PC on, I did try: boot> boot -s which should boot as single user, and it does not, it just shuts off again.
Quote:
__________________
My best friends are parrots |
|
||||
From your symptoms, you have boot blocks and the bootloader is running. You likely do not have a bootable default kernel on that root filesystem, sd0a. Mount that partition, and see what files are in that filesystem. Example:
# mount /dev/sd0a /mnt then $ ls -lh /mnt The default kernel file is "bsd". Do you have one? If not, you may have other files that begin with bsd, such as "bsd.sp" - the single-processor GENERIC kernel, or "bsd.booted", the last successful randomized kernel, and perhaps "bsd.rd", the RAMDISK kernel. You can boot any of these alternative kernels at the boot> prompt, by name. |
|
||||
Thanks again, using "bsd.rd", and "U", (upgrade) worked, it boots as expected now. I all ready had Upgraded, to 6.5, just recently and all my packages, do you think I need to do all the packages again as well, it does not seem like I should need to,...
Yes I do have the "bsd" as well, now, I had not yet read your post, so to be honest, I did not check, there should have been one, at least there was before the power failure,.. never have has this occur before when there was a power failure. I need to get one of those surge protectors, that have a battery and give you a chance to shutdown properly when there is a power failure. Thanks, everything seems fine now. ==== edited === P.S. The device I was using to boot with, is also my back up, and then I have the K: /home partition also copied to another storage device, for extra, I 'rsync' the /home every so often to keep it up to date.
__________________
My best friends are parrots |
|
|||
Well done!
You could also make sure your disk is not damaged by using, from ports, smartmontools (or gsmartcontrol if you want a gui). |
|
||||
Thanks again, every one. Everything seems fine now.How ever I really need to do something about protecting my PC from the power outages, they are very common, and sooner or later I might not be so lucky, guess that is another topic though.
__________________
My best friends are parrots |
|
||||
Garry,
There shouldn't be a situation where you would "lose" the /bsd kernel file from the root filesystem, barring catastrophic filesystem failure followed by answering "yes" to fsck(8) to force removal of the kernel. During a normal boot, a new kernel is randomly ordered and then written to the root filesystem. This process, Kernel Address Randomized Link (KARL), is initiated by rc(8) as it completes, and runs in background. The KARL process uses the following command strings to move the file from the staging directory into the root directory, replacing the old kernel. These steps are designed to be power-failure-proof: Code:
umask 077 && cp bsd /nbsd && mv /nbsd /bsd && \ sha256 -h /var/db/kernel.SHA256 /bsd
|
|
||||
Interesting, I mentioned earlier, the power failures here occur pretty often, and yes, this is the first time anything like this occured. Usually, when the power fails, and then when it is back and I turn the PC on again, no big deal, it will boot, and yes it will say something like "Not shutdown properly, or clean, checking file systems", and it will take longer then normal because it runs checks on all the file systems, then boots.
I am not sure that I actually lost the /bsd file, I did not think to look at that when I booted with the USB drive. I have not installed the smartmontools, as suggested, yet,...however I do have some reasons to think there may be some problems with the HD on this old PC, it is a Dell, : Code:
OpenBSD 6.5 (GENERIC.MP) #3: Sat Apr 13 14:48:43 MDT 2019 deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 3164598272 (3017MB) avail mem = 3059122176 (2917MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (82 entries) bios0: vendor Dell Inc. version "A06" date 11/03/2010 bios0: Dell Inc. OptiPlex 780 acpi0 at bios0: rev 2 acpi0: TCPA checksum error acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA DMAR SLIC SSDT SSDT SSDT acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI4(S5) PCI3(S5) PCI1(S5) PCI5(S5) PCI6(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz, 2992.90 MHz, 06-17-0a cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu0: 6MB 64b/line 16-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges cpu0: apic clock running at 332MHz cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz, 2992.50 MHz, 06-17-0a cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN cpu1: 6MB 64b/line 16-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins, remapped acpimcfg0 at acpi0 acpimcfg0: addr 0xf8000000, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 4 (PCI4) acpiprt1 at acpi0: bus 2 (PCI2) acpiprt2 at acpi0: bus 3 (PCI3) acpiprt3 at acpi0: bus 1 (PCI1) acpiprt4 at acpi0: bus -1 (PCI5) acpiprt5 at acpi0: bus -1 (PCI6) acpiprt6 at acpi0: bus 0 (PCI0) acpicpu0 at acpi0: C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C1(1000@1 mwait.1), PSS acpibtn0 at acpi0: VBTN "*pnp0c14" at acpi0 not configured acpipci0 at acpi0 PCI0: _OSC failed acpicmos0 at acpi0 cpu0: Enhanced SpeedStep 2992 MHz: speeds: 3000, 2667, 2333, 2000 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Q45 Host" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel Q45 PCIE" rev 0x03: msi pci1 at ppb0 bus 1 inteldrm0 at pci0 dev 2 function 0 "Intel Q45 Video" rev 0x03 drm0 at inteldrm0 intagp0 at inteldrm0 agp0 at intagp0: aperture at 0xe0000000, size 0x10000000 inteldrm0: msi inteldrm0: 1440x900, 32bpp wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) "Intel Q45 Video" rev 0x03 at pci0 dev 2 function 1 not configured em0 at pci0 dev 25 function 0 "Intel ICH10 D BM LM" rev 0x02: msi, address f0:4d:a2:27:86:49 uhci0 at pci0 dev 26 function 0 "Intel 82801JD USB" rev 0x02: apic 8 int 16 uhci1 at pci0 dev 26 function 1 "Intel 82801JD USB" rev 0x02: apic 8 int 17 uhci2 at pci0 dev 26 function 2 "Intel 82801JD USB" rev 0x02: apic 8 int 22 ehci0 at pci0 dev 26 function 7 "Intel 82801JD USB" rev 0x02: apic 8 int 22 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27 function 0 "Intel 82801JD HD Audio" rev 0x02: msi azalia0: codecs: Analog Devices AD1984A audio0 at azalia0 ppb1 at pci0 dev 28 function 0 "Intel 82801JD PCIE" rev 0x02: msi pci2 at ppb1 bus 2 ppb2 at pci0 dev 28 function 1 "Intel 82801JD PCIE" rev 0x02: msi pci3 at ppb2 bus 3 uhci3 at pci0 dev 29 function 0 "Intel 82801JD USB" rev 0x02: apic 8 int 23 uhci4 at pci0 dev 29 function 1 "Intel 82801JD USB" rev 0x02: apic 8 int 17 uhci5 at pci0 dev 29 function 2 "Intel 82801JD USB" rev 0x02: apic 8 int 18 ehci1 at pci0 dev 29 function 7 "Intel 82801JD USB" rev 0x02: apic 8 int 23 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb3 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa2 pci4 at ppb3 bus 4 pcib0 at pci0 dev 31 function 0 "Intel 82801JDO LPC" rev 0x02 ahci0 at pci0 dev 31 function 2 "Intel 82801JD AHCI" rev 0x02: msi, AHCI 1.2 ahci0: port 0: 3.0Gb/s ahci0: port 1: 1.5Gb/s ahci0: PHY offline on port 2 ahci0: PHY offline on port 3 scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, HUA721075KLA330, GK8O> SCSI3 0/direct fixed naa.5000cca215d1cacf sd0: 715404MB, 512 bytes/sector, 1465149168 sectors cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVD+-RW GH50N, B104> ATAPI 5/cdrom removable ichiic0 at pci0 dev 31 function 3 "Intel 82801JD SMBus" rev 0x02: apic 8 int 18 iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600 spdmem1 at iic0 addr 0x52: 1GB DDR3 SDRAM PC3-10600 usb2 at uhci0: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci1: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci2: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb5 at uhci3: USB revision 1.0 uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb6 at uhci4: USB revision 1.0 uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb7 at uhci5: USB revision 1.0 uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 vmm0 at mainbus0: VMX (using slow L1TF mitigation) uhidev0 at uhub2 port 2 configuration 1 interface 0 "Primax Electronics USB Optical Mouse" rev 2.00/2.00 addr 2 uhidev0: iclass 3/1 ums0 at uhidev0: 3 buttons, Z and W dir wsmouse0 at ums0 mux 0 uhidev1 at uhub3 port 2 configuration 1 interface 0 "Dell Dell USB Entry Keyboard" rev 1.10/1.15 addr 2 uhidev1: iclass 3/1 ukbd0 at uhidev1: 8 variable keys, 6 key codes wskbd1 at ukbd0 mux 1 wskbd1: connecting to wsdisplay0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (e0f8625185a016ed.a) swap on sd0b dump on sd0b arp info overwritten for 192.168.8.1 by 3c:cd:5d:2b:a7:57 on em0 error: [drm:pid78231:intel_pipe_update_start] *ERROR* Potential atomic update failure on pipe A error: [drm:pid78231:intel_pipe_update_start] *ERROR* Potential atomic update failure on pipe A
__________________
My best friends are parrots |
|
||||
Quote:
Quote:
|
|
||||
Garry, as I mentioned in post #5 above, rc(8) uses fsck -p. When you boot, you see those lovely blue and white kernel messages, and then, immediately following, you see this white text on black, userland message:
Quote:
Code:
echo "Automatic boot in progress: starting file system checks." do_fsck Each of the actions that follow the fsck() are based on the return code from fsck(). Code:
# Check filesystems, optionally by using a fsck(8) flag. # Usage: do_fsck [-flag] do_fsck() { fsck -p "$@" case $? in 0) ;; 2) exit 1 ;; 4) echo "Rebooting..." reboot echo "Reboot failed; help!" exit 1 ;; 8) echo "Automatic file system check failed; help!" exit 1 ;; 12) echo "Boot interrupted." exit 1 ;; 130) # Interrupt before catcher installed. exit 1 ;; *) echo "Unknown error; help!" exit 1 ;; esac } Quote:
|
|
||||
Ok, thanks for taking the time to give the additional details.
__________________
My best friends are parrots |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD Continuous Reboot - failure to boot normally | danieljamespost | OpenBSD General | 4 | 23rd September 2018 01:46 AM |
OpenBSD 6.2 boot failure after install | marcusp | OpenBSD Installation and Upgrading | 16 | 16th March 2018 09:16 AM |
Soft power button doesn't power down | ffonz | OpenBSD General | 4 | 11th May 2015 02:55 PM |
Rebuilding RAIDframe mirror after crash/power failure | sherekhan | OpenBSD Installation and Upgrading | 7 | 25th September 2009 10:06 PM |
init: can't exec getty after power failure | mtx | FreeBSD General | 0 | 20th January 2009 10:14 AM |