mersenneforum.org Using SDHC as Hard Drive
 Register FAQ Search Today's Posts Mark Forums Read

 2017-01-29, 20:50 #1 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 23×461 Posts Using SDHC as Hard Drive I have a system that I somehow got to run from an SDHC card instead of a hard drive. I am trying to set up more this way, but I am not succeeding in any of my subsequent efforts. The system that is running is using an 8GB card. This has proven to be too small, but I have tried copying the system to a larger card via dd, but can't make the new card run at all on the original machine. I have tried starting from scratch with new cards and several ways of copying the old system, but I can't get anything to work. I know I did it once - it is running right now. This is a regular installation, not a live flash drive and the machine boots up with no complaints. Any thoughts are welcome...
 2017-01-29, 20:56 #2 paulunderwood     Sep 2002 Database er0rr E2216 Posts With dd'ed image, you might need to use a combination of fdisk and parted, and run grub-install What did you dd? Last fiddled with by paulunderwood on 2017-01-29 at 21:02
2017-01-29, 21:46   #3
EdH

"Ed Hall"
Dec 2009

E6816 Posts

Quote:
 Originally Posted by paulunderwood With dd'ed image, you might need to use a combination of fdisk and parted, and run grub-install What did you dd?
Thanks for the reply. I'm working from memory, but I copied off the entire 8GB card (/dev/sdh) into a file and then the file to the new card (/dev/sdh). When I tried to use disk and/or gparted to enlarge the partition, they gave me errors. When I tried to use the new card, the system would just hang within the POST operation. I tried several variations of the above. Even if I didn't try enlarging the new card, it wouldn't run. I also tried other cards/adapters.

When I've used dd in the past to clone hard drives, the copy has never needed any grub tweaking. They ran as the old drive and gparted, etc. worked as expected.

I am revisiting this dilemma in a renewed effort to make it work again. I think the working card is actually a micro SDHC in an adapter. I can't see that making a difference, but maybe. I have tried both full sized and micro since then with no luck.

My original install was Ubuntu 12.04. All my recent attempts from scratch have been with 16.04. Maybe there's something in the newer version that is keeping this from working. My 12.04 DVD has become damaged and I can't find the original iso. Maybe when I get a working copy of 12.04 again, I'll try that route.

Unless you have some ideas for me...

 2017-01-29, 22:05 #4 Mark Rose     "/X\(‘-‘)/X\" Jan 2013 B7316 Posts 12.04 is out of support in two months. I wouldn't bother with it. It's most peculiar that dd isn't working. When you boot off different media, do the new and old sdhc devices show up with the same device name?
2017-01-30, 00:58   #5
EdH

"Ed Hall"
Dec 2009

368810 Posts

Quote:
 Originally Posted by Mark Rose 12.04 is out of support in two months. I wouldn't bother with it.
But, if I can get 12.04 to install and run, I can then upgrade. Right now my original (8GB) card isn't large enough to upgrade.

Quote:
 Originally Posted by Mark Rose It's most peculiar that dd isn't working. When you boot off different media, do the new and old sdhc devices show up with the same device name?
I'll have to wait until I can get a copy version to boot.

Right now I'm waiting for a current copy (via dd) to complete. I tried a copy of the older one earlier and it almost worked, but not quite. But, when I put the card in a separate system to try to increase the partition, gparted couldn't find any partition information.

2017-01-30, 02:19   #6
Mark Rose

"/X\(‘-‘)/X\"
Jan 2013

55638 Posts

Quote:
 Originally Posted by EdH But, if I can get 12.04 to install and run, I can then upgrade. Right now my original (8GB) card isn't large enough to upgrade.
8 GB can be a bit tight if upgrading a full desktop installation, agreed. Try the server installation if you're comfortable with the command line.

Uninstalling unused kernels including the header files will help free up a lot of space (about 150 MB each). Running apt-get clean and apt-get autoremove is also a good idea.

My 4-node cluster is running on some old 4GB flash drives with about 1.9 GB used. I could probably remove half the packages on the system. I remember installing Debian with / on a 100 MB drive and /usr on a 130 MB drive. Those were the days.

Actually, let's see what I can remove for space from a 16.04 server install (leaving some extra tools and mprime around). I'll start by leaving only one kernel installed, with apt-get clean and autoremove run: df -m shows 1484 MB used.

I don't need any of these packages: apparmor apport apport-symptoms at bcache-tools btrfs-tools byobu cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf command-not-found command-not-found-data cryptsetup cryptsetup-bin dmidecode dnsutils dosfstools eject file ftp geoip-database git git-man grub-legacy-ec2 hdparm info laptop-detect linux-headers-generic lvm2 lxc-common lxcfs lxd lxd-client mdadm nano mtr-tiny ntfs-3g open-iscsi open-vm-tools os-prober parted pastebinit popularity-contest squashfs-tools ssh-import-id tasksel tasksel-data tcpdump telnet time ufw vlan xauth xfsprogs zerofree

After removing them, their installed dependencies, and the linux headers for the installed kernel, df -m shows 1261 MB used. That leaves about 2.5 GB free, which might be enough to do a release upgrade. Would be tight though.

 2017-01-30, 03:03 #7 EdH     "Ed Hall" Dec 2009 Adirondack Mtns E6816 Posts I'm still using a desktop on my machines and vncing in, but I do also ssh into them for lots of maintenance. I'm not comfortable enough with getting into multiple tmux sessions and each machine is running several scripts. They're all in terminals on the desktop for each, which is really causing overhead, but I can see everything and call up different tasks. I have had some success tonight. I was able to clone the working 8GB micro SDHC onto a 32 GB full sized SDHC and enlarge the primary partition. All went well, although I would swear the desktop itself is extremely sluggish, but the packages such as ggnfs and ecm.py/ECM seem to be about the same. I did not have as good a time with a 32GB micro SDHC card. Everything worked up to the point where I enlarged the primary partition and tried to reinstate the swap area. I remember this trouble from the past. I get the following error: Code: Invalid partition table on /dev/sdf -- wrong signature ffff And then, nothing else with gparted will work. However, this time the micro SDHC card did boot up and run fine, even seeming to not have the sluggishness of the full sized card. But, of course, there's no swap space. So far, this time, I've been successful, but my next step is to try to get other machines running in the same way. Trying several different machines in recent times left none of them working. Maybe I can keep hold of tonight's luck for a bit... Thanks for the info.
 2017-01-30, 15:37 #8 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 23×461 Posts I guess all is not well after all. I tried upgrading and got a message that basically said that the upgrade could not be performed because my system was in an unstable state.
 2017-01-30, 19:02 #9 Mark Rose     "/X\(‘-‘)/X\" Jan 2013 3×977 Posts Try running apt-get install -f and see if that fixes it.
2017-01-30, 23:50   #10
EdH

"Ed Hall"
Dec 2009

368810 Posts

Quote:
 Originally Posted by Mark Rose Try running apt-get install -f and see if that fixes it.
The system changed the whole drive to read only because of the failure, so I had to try a restart and it no longer boots at all. I may try a different tack if I get a chance tonight.

Thanks for the help.

 2017-02-13, 19:25 #11 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 23×461 Posts Well, after a lot of experimenting, I'm baffled and rather disappointed. I was able to get a system up and running from an SDHC card early on. It is still running although it was too small (8G) to upgrade from the original Ubuntu 12.04. I have not been able to get another SDHC card to work. I have tried dd copying the original system onto another card. I have tried to install directly to another card. I have tried newer versions and the original 12.04. None of them will get past the partitioning phase of the SDHC card. So, I tried different disk utilities such as disks and gparted. They all fail. Why/how did the first one work? The good news is that I have successfully gotten a USB "thumbdrive" to work (almost**). It looks like there is something different between SDHC cards and USB drives that allow the drives to work, but not the cards. **Although I do have a working USB drive, it occasionally throws an error that causes the system to lock everything into read-only. When I reboot, sometimes I get a bad block message, but so far it's been "fixable." I have some larger USB drives on order to see if I can get more full blown systems running that way. Of course, the first SDHC attempt worked. I hope that isn't the MO for my future USB thumbdrives...

 Similar Threads Thread Thread Starter Forum Replies Last Post TheMawn Lounge 32 2013-10-12 06:06 Unregistered PrimeNet 6 2005-01-05 14:16 yankeesmarc923 Software 4 2004-06-16 21:58 ixfd64 Hardware 8 2004-06-03 20:37 delta_t Software 4 2003-06-26 13:54

All times are UTC. The time now is 10:43.

Sat Apr 17 10:43:55 UTC 2021 up 9 days, 5:24, 0 users, load averages: 2.29, 2.19, 2.25