LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-08-2022, 08:22 PM   #1
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
Question N00b tutorial needed: fix/boot ext usb hdd: tools/cmds?


I think drive physically OK. I don't remember how I created it, yearS ago.
I don't remember what I might have done to try to make it bootable.
It may have a ?backup?/copy of XP sp2.

When I boot it, grub says something sorry, I'll try to get a pic. ?: no way to copy&paste nor |nc termbin ??
?**: Is there some 'dump-grub' cmd to examine&post/termbin the full state of grub? ?? ???**
https://help.ubuntu.com/community/Grub2/Troubleshooting

I web-search: repair grub xp mbr but there's sooooo many ways that my mind is overwhelmed.

I thought of trying to dd back ?some? 512byte mbr 1block... IDK...

Code:
$ sudo lsblk -f /dev/sdb
NAME   FSTYPE   LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sdb                                                                            
├─sdb1 ntfs     SW_Preload ACF0544FF05421BE                                    
├─sdb2 ext4                ff7165c1-74fc-4862-adb5-1c1aa30a0784    6.4G     6% /media/user/ff7165c1-
├─sdb3                                                                         
└─sdb4 reiserfs            bf28c74f-8d4b-45f6-b8e2-39310ea3a064  687.4G     2% /media/user/bf28c74f-
$ sudo mount /dev/sdb1 /mnt
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 4096   usa_ofs: 0  usa_count: 0: Invalid argument
Corrupt index block signature: vcn 0 inode 5
Failed to open $Secure: No such file or directory
Failed to mount '/dev/sdb1': No such file or directory
$ sudo ntfsfix /dev/sdb1
Mounting volume... ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 4096   usa_ofs: 0  usa_count: 0: Invalid argument
Corrupt index block signature: vcn 0 inode 5
Failed to open $Secure: No such file or directory
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 4096   usa_ofs: 0  usa_count: 0: Invalid argument
Corrupt index block signature: vcn 0 inode 5
Failed to open $Secure: No such file or directory
Remount failed: No such file or directory
Code:
$ sudo fsck /dev/sdb1 # produced no change; IDK why it said nothing!
fsck from util-linux 2.33.1
$ ls /media/user/*
/media/user/bf28c74f-8d4b-45f6-b8e2-39310ea3a064:
bin   dev  home     lib    libx32  mnt  proc  run   sys       tmp  var
boot  etc  KNOPPIX  lib64  media   opt  root  sbin  tftpboot  usr

/media/user/ff7165c1-74fc-4862-adb5-1c1aa30a0784:
bin   dev  home        lib         media  opt   root  sbin     srv  tmp  var      win
boot  etc  initrd.img  lost+found  mnt    proc  run   selinux  sys  usr  vmlinuz  XP
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: External USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x931a31d0

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sdb1         3074048  467912703  464838656 221.7G  7 HPFS/NTFS/exFAT
/dev/sdb2       467912704  483536895   15624192   7.5G 83 Linux
/dev/sdb3       483536896  488396799    4859904   2.3G 82 Linux swap / Solaris
/dev/sdb4  *    488396800 1953525167 1465128368 698.6G 83 Linux
$
Code:
$ sudo parted -l /dev/sdb
Model: ATA ST9250315AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  107GB  107GB   primary   ntfs            boot
 2      107GB   239GB  132GB   extended
 5      107GB   112GB  4295MB  logical   linux-swap(v1)
 6      112GB   146GB  34.4GB  logical   ext4
 3      239GB   250GB  10.7GB  primary   fat32
 4      250GB   250GB  17.5MB  primary                   hidden

Model: Toshiba External USB 3.0 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1574MB  240GB   238GB   primary  ntfs
 2      240GB   248GB   8000MB  primary  ext4
 3      248GB   250GB   2488MB  primary
 4      250GB   1000GB  750GB   primary  reiserfs     boot
$
I welcome links, switches, cmds, .....
?: would running 'boot-repair' iso ?damage? a chance for XP to boot? CLI (vs iso)?
Hers's the boot-repair info (hdd on other PC, so different sda!) https://paste.ubuntu.com/p/M6RwyDKPsh/
?: I dropped the g from parted (I hate that I can't copy&paste GUI, like text!) Is this the best/most-extensve util?

Sorry to be sooooo LOST.... TiA: Thanks in Advance...

Edit: More: logs: # egrep 'Aug 8 17:[45]|Aug 8 18:' /var/log/* 2>/dev/null |nc termbin.com 9999
https://termbin.com/1ii4 Oooops: ignore the 1st third which is auth.log stuff mysteriously going on

zt has available targets 1/line: abstraction, arc_hints, baremetal_hints, bios_hints, compatibility_hint, cryptodisk_uuid, device, disk, drive, efi_hints, fs, fs_label, fs_uuid, gpt_parttype, hints_string, ieee1275_hints, msdos_parttype, partmap, partuuid, zero_check [default=fs]
Code:
# for i in `cat zt`;do grub-probe  -d /dev/sdb1 -t $i;done

ahci1,msdos1 
hd1,msdos1 
hd1,msdos1
/dev/sdb1
/dev/sdb
(hostdisk//dev/sdb,msdos1)
hd1,msdos1 
ntfs
grub-probe: error: INDX label not found.
ACF0544FF05421BE

--hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 

07
msdos
931a31d0-01
false
# for i in `cat zt`;do grub-probe -m /media/user/ff7165c1-74fc-4862-adb5-1c1aa30a0784/boot/grub/device.map -d /dev/sdb2 -t $i;done

ahci1,msdos2 
hd1,msdos2 
hd1,msdos2
/dev/sdb2
/dev/sdb
(hostdisk//dev/sdb,msdos2)
hd1,msdos2 
ext2

ff7165c1-74fc-4862-adb5-1c1aa30a0784

--hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 

83
msdos
931a31d0-02
false
# for i in `cat zt`;do grub-probe  -d /dev/sdb3 -t $i;done

ahci1,msdos3 
hd1,msdos3 
hd1,msdos3
/dev/sdb3
/dev/sdb
(hostdisk//dev/sdb,msdos3)
hd1,msdos3 
grub-probe: error: unknown filesystem.
grub-probe: error: unknown filesystem.
grub-probe: error: unknown filesystem.

--hint-bios=hd1,msdos3 --hint-efi=hd1,msdos3 --hint-baremetal=ahci1,msdos3 

82
msdos
931a31d0-03
true
# for i in `cat zt`;do grub-probe -m /media/user/bf28c74f-8d4b-45f6-b8e2-39310ea3a064/boot/grub/device.map -d /dev/sdb4 -t $i;done
hd0,msdos4 
hd0,msdos4 ahci1,msdos4 
hd1,msdos4 
hd0,msdos4
/dev/sdb4
/dev/sdb
(hd0,msdos4)
hd0,msdos4 hd1,msdos4 
reiserfs

bf28c74f-8d4b-45f6-b8e2-39310ea3a064

--hint-bios=hd1,msdos4 --hint-efi=hd1,msdos4 --hint-baremetal=ahci1,msdos4 --hint='hd0,msdos4' 
hd0,msdos4 
83
msdos
931a31d0-04
false
#

Last edited by GentleThotSeaMonkey; 08-09-2022 at 02:51 AM.
 
Old 08-09-2022, 02:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,913

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
first would be nice to explain what is the problem you want to fix and what do you want to achieve. I guess a simple grub-install might work for you, but I don't really understand your issue.
 
Old 08-09-2022, 03:17 AM   #3
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338

Original Poster
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
I want to first fix the mount error (in 1st code block & below).

I also want to boot sdb{1,2,4} See lines 44,58,72 in paste.ubu URL (sdb3 is swap)
The only thing CLI-boot-repair says it would fix is sda, which is my various-PC's internal disk, which I don't want to touch.
I guess i need to boot the boot-repair.iso (&hope it won't touch sda... I do have a PC with no hdd, so I'll try there.)
I don't want grub-install to even 'think' about the various sda's!

I'd actually like to fully learn the lowest-level-up way to fix it manually!

I'm afraid to mess up the disk by: sudo lilo -M /dev/sdb mbr

I wonder whether M$Win10 could fix it (? I do have but never run & know zero about M$WinBlows10)

Code:
$ sudo mount /dev/sdb1 /mnt
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 4096   usa_ofs: 0  usa_count: 0: Invalid argument
Corrupt index block signature: vcn 0 inode 5
Failed to open $Secure: No such file or directory
Failed to mount '/dev/sdb1': No such file or directory
$

Last edited by GentleThotSeaMonkey; 08-09-2022 at 03:45 AM.
 
Old 08-09-2022, 03:34 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,913

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
would be nice to check those partitions, like fdisk -l (or similar)
also what is in /etc/fstab ?
 
Old 08-09-2022, 03:48 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,736

Rep: Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920Reputation: 5920
ntfsfix can only repair simple errors. You need to connect the drive to a Windows system and run chkdsk. Hopefully the 1st partition on that drive isn't totally corrupted.
 
Old 08-09-2022, 04:24 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,534

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Agree with michaelk, you've already run ntfsfix and it failed so there is likely no tool in Linux to repair it. The lsblk output shows that partition (ntfs) is corrupt so you need to run chkdsk from windows and hope. fsck won't work on an ntfs partition, you need windows chkdsk.


Some of the options in boot repair will overwrite the MBR of all disks attached except the usb you are booting from so don't do any more than running boot repair and selecting the Create BootInfo Summary. Boot repair won't 'fix' a windows bootloader, just add an entry for it so if your boot files on XP are corrupt you need windows software to repair it. What happens when you try to boot XP? Also, I don't think windows 10 will help as it uses a different bootloader than XP. Might try a windows forum.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Ext HD into Ext3 format only (not Ext 3/4) John Glasgow Fedora 8 01-02-2012 08:56 AM
New Seagate 1TB USB ext HDD stiffs Linux boot sequence but older 230MB ditto is fine Richard Molton Linux - Hardware 11 06-29-2009 06:36 PM
KDE cmds for virt. desktops?? Sinope Linux - General 4 09-02-2004 07:34 PM
Filesystems: ext 2, ext 3, reiserfs. Which one? r3dhatter Linux - Newbie 12 07-15-2004 12:53 AM
Toshiba boot problems - USB ext HDD - new install wtriver Linux - Newbie 5 11-02-2003 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration