I thought I posted this earlier but I must have done something wrong.
I was looking through a box of old stuff and found a usb enclosure with a 40GB hard drive. When I plug it in, it shows two partitions. That is, when it is recognized. Sometimes Tumbleweed sees it and other times it doesn’t. My Windows 10 install doesn’t see it. If I have it plugged in when booting, the booting stalls. It also stalls programs if I wait to plug it in until after a clean boot. It has at least 1 if not 2 OS partitions.
I would like to use it as storage. I am thinking I need to re-partition it but don’t know a safe procedure. If possible, I would like Windows to be able to access it. I might be able to plug it in my router. Can I mount it there for access from all devices in my home network? What file system do I select?
I don’t know why I didn’t try this earlier. I tried booting from the usb drive. It has a failed suse 11.2 installed on the drive. I say failed because it won’t boot. It goes through the boot process and stalls with this message
Could not find /dev/disk/by -id/ata-WDC and goes on with the drive description
At the end of the message is says
do you want me to fall back to (similar disk id number) part 2? y/n
It doesn’t matter which I pick it fails with this message
Inappropriate ioctl for device
The suse 11.2 boot screen has the option to boot to failsafe. That gives the identical result. When the boot fails, it drops to the command line with the $ prompt. About the only commands that work from there are ls and cd. If I have a command prompt, doesn’t that mean it booted? Just no gui.
Do you want to know why it is “recognized” one time and not on another occasion?
Then you should post what makes you think it is recognized or not. E.g. by posting
lsusb
to see if it is recognized as USB device.
Or/and
fdisk -l
to see if it added as mass-storage and to see if it has partitions or not.
Alternative you can use
lsblk
And of course when it connects sometimes and sometimes not, that is difficult to assess, but IMHO that points to a hardware failure.
Do you want to partition that mass-storage device?
Then first decide why you want to partition and how many partitions and what for. When your plan is ready you can use YaST > System > Partitioner to execute it.
Do you want to boot such an old system?
When you are really interested to resurrect that old system, I assume then your first question must be solved. Why is it detected sometimes only. Because when the hardware is broken, then during boot all sorts of things can happen. Including not finding partitions. Of course it is also possible that disks or partitions from disks that were available when the old system worked are now gone. But these are all things you should know better.
All I want to do is use it as a storage device; preferably accessible to Tumbleweed, Windows and/or storage attached to my router (a Linksys which permits attaching external storage.) It currently has 3 partitions: swap, system and home.
I was guessing it had to be a FAT partition. One partition is fine. Windows accessibility is NOT a necessity. There is nothing on the drive worth saving. I just don’t want to guess how to do this properly. The only time I’ve partitioned a disk was during an OS install and I just accepted the suggested setup.
What does “lsblk --fs” (you’ll need to use the user “root”) indicate?
You can also use “fdisk -l /dev/sd**?**
” – where “?” is the letter for the USB drive indicated by “lsblk” – and/or “gdisk -l /dev/sd**?**”, to check if the Disklabel type is GPT or something else – such as DOS …
Like @nrickert, I assume it is not so interesting to find out what is on the disk now (the more because the OP wants to overwrite it with something new), but why the disk is detected one time and not the other. As long as it is not certain if the hardware can be trusted, any further step is useless IMHO
.
You are corect, all that information is important, interesting and often needed.
But in this case, as long as we do not know if the device is broken or not the value of the information is nil.
And even if the device is OK, then we do not need that mass of information, as the OP is only interested in using the device removing/forgetting/ignoring all that is on it now. Only thing he needs is: how large is it, what is the device file to manage it and what is the plan.
sdd is an older disk which should be removed from the system;
sde is the previous (not UEFI) system’s system disk;
sr1 is a DVD-RAM used for KWallet backups.
“smartctl --all /dev/sdd” indicates that, the raw Read Error Rate isn’t zero and, hardware ECC recovered more than zero ECC errors – which is why it’s being taken out of service …
If the device is suspected to be broken then “smartctl --test=short” will possibly indicate if it’s broken or, not …
If the device capacity is large, “smartctl --test=select,10-2000” may shake out some device errors …
To all posters who are trying to help me: I ask for your patience. I will try to get all the info you suggest, starting with this:
fdisk -l /dev/sdb
**Disk /dev/sdb: 37.28 GiB, 40020664320 bytes, 78165360 sectors**
Disk model: 0EB-00CPF0
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: 0x897a897a
**Device****Boot**** Start**** End**** Sectors**** Size****Id****Type**
/dev/sdb1 63 1012094 1012032 494.2M 82 Linux swap / Solaris
/dev/sdb2 * 1012095 31953284 30941190 14.8G 83 Linux
/dev/sdb3 31953285 78156224 46202940 22G 83 Linux
From this I see there is a third (swap) partition and a boot partition. I wonder if that was giving me trouble accessing the drive. Does it try to boot when I access it? I guess just deleting the data on the drive is not enough. That partition has to go.
lsblk shows sdb2 and 3 to be ext4.
When I powered up the drive to run these commands, it wasn’t recognized. Shutting it off and powering on got it recognized immediately.
fIrst, I do not think there is a boot partition. There are three partitions and they probably are put there, when installing a system long time ago, as Swap, file system for / and file system for /home.
It is complete nonsense that it tries to boot when you access it.
It is just a disk filled with three partitions. Bit as you apparently (at least that is what I understand) want to use it for something completely different, it is of not interest what is on it now. Just forget that.
Device Boot Start End Sectors Size Id Type
/dev/sdb1 63 1012094 1012032 494.2M 82 Linux swap / Solaris
/dev/sdb2 * 1012095 31953284 30941190 14.8G 83 Linux
/dev/sdb3 31953285 78156224 46202940 22G 83 Linux
The asterisk in the “Boot” column of /dev/sdb2 shows that partition is flagged as bootable, but AFAIK fdisk makes no further check as to the presence or otherwise of any boot code.
It is nonsense. The only time that something boots from somewhere is when the hardware/firmware does a boot. Not when a disk is connected to a running system. I have no idea what the OP means with “access”, but when one or more of the file systems there is mounted, that will be not cause a boot. And you can add the swap partition to your swap space (and call that “access”) but the result will never be a boot.
Apologies. I should have read the entire thread. I wrongly assumed the OP had rebooted the system rather than connecting the drive to an already booted system. :embarrassed: …
I admit it is a bit confusing. In my first post I already asked what the goal is. As far as I understand it, the goal is to use the device for something new. Thus what is now on it is of no importance in spite of the good guidance given above by some on how to find out and how to recover.
I apologize to all for making this a difficult problem. It is harder than it should be, in part, because I’m embarrassed by my own ignorance and I was hoping to get answers without revealing that ignorance. I’ll try to be more clear.
To begin with, I’ve caused confusion when I talked about “accessing” this drive. All I meant was opening up dolphin to see what files were on the drive. It appears to me that this drive must have been pulled from an old desktop pc from years back. It has suse 11.2 installed on it.
I have connected it to my laptop two ways. First, I have it plugged in and powered up when I boot. It stalls the boot up process at, what I am guessing, is the bios setup stage. The laptop manufacturer’s logo is on the screen and it stays frozen there. If I power the drive off, it instantly continues the boot and I can re-power it up during the boot process and the boot continues. I did this a few times before I noticed there is now a pair of new grub entries for suse 11.2 milestone; one for the “regular” boot and one for advanced. Neither boot all the way. They fail saying they can’t find a file.
The second way I connect the drive is to wait until Tumbleweed has fully loaded and then power up the drive. There is a couple of minutes of disk activity (from the usb drive) then I get the pop-up saying a removable device is available with 2 partitions: one of 22 GB and the other 13.9 GB. That’s when I can “access” it via dolphin.
I have bootable usb thumb drives with other OS’s installed: Tails and linux Mint. My original post was looking for opinions: should I make this another bootable usb drive or just have more storage? I’ve decided on storage. This is where my embarrassment comes in. I can’t get past the first page of the yast partitioner because I don’t know what to choose. I select the sdb partition and select the tab that says partitions. I’m presented with 3 partitions: swap and the two listed above (although sdb2 now shows as 14.75 GB, not 13.9 GB). When the swap partition is selected, I have actions available. There is a modify drop-down box that says edit, resize or move. Next is a delete button. Then there is an add partition button, delete all button, an abort button, and finally, a finish button. I haven’t made any choice since I don’t know what will happen after that. Meaning will there be other choices I’m not prepared for when I’ve already done “something” to the drive.
All I want to do is end up with a single partition for storage and wipe out the vestiges of suse 11.2 milestone.
I think at that point, you just need to delete all three partitions. Then there should be an option to create a new partition, which is the partition that you want.
If you click “Abort” then it won’t actually do anything. It is at the end when you click “Finish” that it actually does the deleting, creating, formatting.