LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-25-2017, 11:17 PM   #16
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled

As far as I can tell, nothing. When I plug in the hard drive after booting from usb (ie at normal desktop) without disabling it, no new dmesg shows up and the above code (meant to rescan scsi) does nothing. fdisk only shows the ram the live usb is using, the free few gigs on the usb, and my cdrom. Same with lsscsi.
 
Old 05-25-2017, 11:18 PM   #17
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Try #15. Yes, the init=/bin/sh goes anywhere on that line. (what it does is kinda 'cool'; web-research it!)
I'm really curious to see whether it's the ahci pata driver (compiled into the kernel vs. a .ko module) or udev/systemd/? doing this. (I wish I knew 'all' of how /sys/dev* {scsi,ata#,host#} {/delete,rescan,enable,*} works, but digging thru the kernel source code is beyond me currently, tho any GuruInfo is very welcome here!)

Realstically, I suspect the hdd is 'bricked' (although it makes a great learning experience or advanced hands-on cert test).
 
Old 05-25-2017, 11:18 PM   #18
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Try #15. Yes, the init=/bin/sh goes anywhere on that line. (what it does is kinda 'cool'; web-research it!)
I'm really curious to see whether it's the ahci pata driver (compiled into the kernel vs. a .ko module) or udev/systemd/? doing this. (I wish I knew 'all' of how /sys/dev* {scsi,ata#,host#} {/delete,rescan,enable,*} works, but digging thru the kernel source code is beyond me currently, tho any GuruInfo is very welcome here!)

Realstically, I suspect the hdd is 'bricked' (although it makes a great learning experience or advanced hands-on cert test).
 
Old 05-25-2017, 11:24 PM   #19
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Ooops, web-glitch dup and 'ninja'!

There's likely something to rescan for hotplug, but NewbieMe doesn't know it.

p.s. You don't happen to have a pata to usb adapter (for #15, reread more closely), do you?

Last edited by !!!; 05-25-2017 at 11:28 PM.
 
Old 05-25-2017, 11:28 PM   #20
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Yeah enjoy learning more about grub and booting. Anyways adding the init=/bin/sh only worked when I included the libata.force=1:disable also. So I guess whatever libata is doing comes before the shell is initialized. I could even delete everything on that line (the file= and boot=) and still get a prompt, but again only if the libata parameter was included.

With the libata parameter the only thing that happens is:
[ 5.720082] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 5.722879] ata1.00: FORCE: horkage modified (disable)
[ 5.722883] ata1.00: unsupported device, disabling
[ 5.722886] ata1.00: disabled

So at least the 6.0 Gbps is correct.

edit: Ah, yes, I have an adapter actually..but I think it only does the 7-pin data line and not the larger power connection. Similar to this. The ones with both ports arent that expensive though it seems, maybe Ill snag one.

Last edited by mishima; 05-25-2017 at 11:34 PM.
 
Old 05-25-2017, 11:41 PM   #21
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Huh? Do you mean it (the kernel) still hung/errors with init=/bin/sh appended? (no disable)
(My beloved init=/bin/sh ?always? "works", on any "normal" situation, I thought!)

Edit upon reread: oh, probably "yes".

I was afraid of that. Might a distro that has ahci as a loadable .ko help here?

IF we can *attach the bricked hdd*, should we file a kernel bug?

Last edited by !!!; 05-26-2017 at 12:15 AM.
 
Old 05-25-2017, 11:45 PM   #22
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Well the efi was there too. You mean get rid of even that? It was:

linux /casper/vmlinuz.efi init=/bin/sh libata.force=1:disable ---
 
Old 05-25-2017, 11:57 PM   #23
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
? Does init= do same hang/error from the bad hdd? Or a different "not work"?

Sorry, I know zero about EFI (but my wild-guess is that it's not related)

No, I meant just add it to end (leaving all the original, I thought wouldn't matter)

Other topic: can you download and put on USB, a different distro, with sata/ahci stuff loadable?
(I'm not sure what distro tho; not that 7mb mll I mentioned earlier: it has all compiled in, no modules).

Last edited by !!!; 05-26-2017 at 12:16 AM.
 
Old 05-26-2017, 12:13 AM   #24
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Yes it was the same error when I did init=/bin/sh without libata.force=1:disable and bad hdd plugged in.

I'll browse distros a bit.
 
Old 05-26-2017, 12:42 AM   #25
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Searching LQ for libata sata ahci (&skipping titles about other devices) found this lsmod *debian*! And a scan here

Oh, searching the web for ?key? parts of your exact error msgs, *in double-quotes*, may find simlar situations

Last edited by !!!; 05-26-2017 at 12:54 AM.
 
Old 05-26-2017, 12:52 AM   #26
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
While looking for a kernel without libata built in I came across something. Libata is built-in to the kernel but ahci module isn't. That means I do

module.blacklist=ahci

in grub and like libata.force=1:disable the boot completes and drops me at desktop. However since ahci is a module I can reverse the toggle by just a

sudo modprobe ahci

and suddenly all 8 of my beautiful lost partitions populate the /dev folder. Now to see if I can mount any...
 
2 members found this post helpful.
Old 05-26-2017, 04:39 PM   #27
mishima
LQ Newbie
 
Registered: Apr 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
Took a while for the damaged partition to mount but eventually was able to get all my important stuff transferred over to the new drive using normal means.

Just wanted to come back and say thanks for pointing me in the right direction.
 
1 members found this post helpful.
Old 05-27-2017, 02:25 AM   #28
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
please mark your thread solved.
others will certainly benefit from this.
 
  


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
[SOLVED] Check health of USB hard drive martvefun Linux - Hardware 14 01-01-2012 01:59 PM
Booting Linux on an external USB hard drive (not a memory stick, a hard drive) comcastuser Linux - Hardware 4 01-13-2010 06:59 PM
Booting from an USB hard drive GP16 Linux - Newbie 4 04-26-2007 12:44 AM
Booting FC-6 via USB hard drive sfjtraps Fedora 1 02-22-2007 09:57 AM
Booting from a USB hard drive?? justiceisblind Linux - Newbie 4 05-24-2002 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:58 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