External hard drive Slackware bootup partitioning? (14.1/current?)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
External hard drive Slackware bootup partitioning? (14.1/current?)
So, I am thinking about turning a part of my external hard drive (Toshiba 1TB USB3.0) into a Slackware 14.1 bootable drive for a testing arena for new DE's, programs, projects and whatnot. Also, with the hard drive being nice and portable (and USB3.0), I intend to take this around and show off my testing and system to other people.
Now, I already have Slackware 14.1 (x86_64) already installed on my Laptop (uber fast 128GB SSD for only $60-ish), so that is no issue. I personally use BTRFS, but could also use EXT# as I have had a bit of exp. with EXT2 and EXT4. I also intend for this to be used rather infrequently, and not a 365-day per year boot-up. Just for testing out some new softwares (especially DE's and some "pet-games" as I would call them.)
Now, enough of the intro. The whole issue here is that I want to keep a FAT32 partition (~700GB) on there to transfer all my files between my computer, my Mom/Grandparent's/Everybody else's Windows PCs and my Dad's/my Slackware computer, Backup, etc... Anyway...
First off, would it be feasible to do this? Would I have no issues with Windows and a bootable drive on the same device? Second off, what exactly would I do. I know the general idea of it and partitioning out a new drive for my own computer, but IDK about this...
Thnx for your help. I have already ruined a 32GB Flashdrive (~$25) trying to do this, don't ask me how. I'm guessing it is a whole slew of things. X'D
(PS: As detailed as possible is really nice, because I am a bit more paranoid now that I ruined another device...don't ask. )
It would certainly be possible to have a windows partition and a separate Slackware partition. When you install Slackware, just install Lilo (or Grub if you use it) to the MBR of the external drive. Make sure you get the correct drive. Not sure why you would want FAT32 rather than ntfs. Should not make any difference whether you install Slackware first and then create a windows partition or do the reverse but installing Slackware first might be easier if you are unfamiliar with partitioning. I don't know why you think this would think this would be a problem.
See the paranoia part. I honestly don't know how, but I have ruined multiple flashdrives, and this last one was pretty expensive (I normally buy USB2 not 3). I do want to be careful with this one. TBH, I think it died in attempting to boot. Spat out some error and died. Well, whatever. It was my fault for probably doing something stupid and there is no recovery (unless there is some black-magic involved XD ).
Also, is NTFS compatible with XP/Vista? Kinda need that. I need to be able to bridge all the OS's I am stretched across.
[Edit]
Quote:
So would it be best (read:easiest) just to format it (in my case, to a BTRFS fs), make bootable, install/configure everything, and then partition off a FAT32 (or maybe NTFS) part? I am more familiar with the install on things like the raspberry-pi with slackware-arm. Not having to do with anything external. I am guessing it is the same, but I don't know.
Scratch that. After looking it all over again, and clearing out my head, how would I install LILO to the MBR of my eHDD?
[/Edit]
Anyway, I will be a lot more clear-headed after finals and all that 'school-stuff', and I probably should only try this during winter-break.
Last edited by WisdomFire; 12-16-2015 at 07:47 PM.
Maybe you did not really ruined your flash drives, but just erased the MBR/GPT, making them tentatively unusable. I write "tentatively", because when that happens it is generally easy to just zero the boot sector and rebuild a partition table.
To find out, please plug in, one at a time, each flash drive that you own, even if you consider it ruined, wait say 30 seconds for it to settle and type this command on Linux:
Code:
lsblk -o model,name,size,type,fstype
and posts the results here for each flash drive. if you see one of these devices in the output, even as a disk with no partition, probably all is not lost. Then, we will give you instructions how to make them usable again.
Last edited by Didier Spaier; 12-16-2015 at 09:46 PM.
The others I don't really care about. They were 4GB USB2 and they are laying around buried somewhere and I don't want to find them. They were a set of 20 on ebay for about $15-ish
EDIT: This is the 32GB one I spoke of.
Last edited by WisdomFire; 12-16-2015 at 09:57 PM.
plug it in and retype the command to check that it bears the same name (to make sure that you are not going to loose all data on another device...)
Assuming that the device name is still sdb, type this to wipe its boot sector:
Code:
dd if=/dev/zero of=/dev/sdb bs=512 count=1
EDIT: I first I wrote /dev/sdx. In your case it should be /dev/sdb or whatever the output of lsblk gives you.
Create your new partitions on the USB drive with cfdisk, fdisk, gdisk, cgdisk, gparted, parted, whatever.
Put in each of the partitions you just formatted a filesystem consistent with the partition type.
If you are unfamiliar with the commands to type and the underlying concepts you will probably be more comfortable performing steps 3) and 4) with a graphical tool like gparted live.
PS never buy too cheap or used USB drive unless you do not care about the data you will put on it. But then, why store these data?
Last edited by Didier Spaier; 12-16-2015 at 10:16 PM.
Reason: PS added.
plug it in and retype the command to check that it bears the same name (to make sure that you are not going to loose all data on another device...)
Assuming that the device name is still sdb, type this to wipe its boot sector:
Code:
dd if=/dev/zero of=/dev/sdb bs=512 count=1
EDIT: I first I wrote /dev/sdx. In your case it should be /dev/sdb or whatever the output of lsblk gives you.
Create your new partitions on the USB drive with cfdisk, fdisk, gdisk, cgdisk, gparted, parted, whatever.
Put in each of the partitions you just formatted a filesystem consistent with the partition type.
If you are unfamiliar with the commands to type and the underlying concepts you will probably be more comfortable performing steps 3) and 4) with a graphical tool like gparted live.
PS never buy too cheap or used USB drive unless you do not care about the data you will put on it. But then, why store these data?
Thank you sooooo much. I had absolutely no idea what to do with it, and this has resurrected my flashdrive. Black-magic... I do know what to do from here, and am comfortable enough with cfdisk.
Also, the cheap 4GB ones do work. However, the 2 I crashed had a very similar error, because I suppose I was doing something weird with BTRFS, which was still more or less completely experimental at that time. The others (well, I've only really used 7ish plus the two "dead" ones or so, but the rest) should (hypothetically) work. And plus, 4 or so were for data transfer, and the rest were data storage for tinkering projects I didn't want on my computer. I only have a 128GB SSD, and am not in the best of financial straits, especially as a student. Ahhh well. Life goes on.
Back to the original question I had, is installing LILO on a MBR really any different for an /dev/sdb(c/d/...) drive instead of the local dev/sda drive? (this is how I have set my slackware up in this case...)
Last edited by WisdomFire; 12-17-2015 at 09:26 PM.
partitioning is not a question there, imho.
the question, who i not solved yet, in situation when you make bootable system on external drive -how it boot and mount local ( also root) partition.
bnecause on one system your external drive turns out as sdb, on other - sdc, on third - it may be sdd.
last time, when i try make lilo understand a uuid, it not work....
last time, when i try make lilo understand a uuid, it not work....
It is certainly possible to use UUID (and you're right in that it would need to be used in this case since the drive mappings would likely change on different computers). He'll need to have both /etc/lilo.conf and /etc/fstab converted to UUIDs (or labels, but UUIDs are more likely to be unique). See my post here on what needs to be done to use UUID in your lilo.conf (and your fstab -- this should be a complete solution to switch your system to UUID).
Quote:
Originally Posted by WisdomFire
Also, is NTFS compatible with XP/Vista? Kinda need that. I need to be able to bridge all the OS's I am stretched across.
Yup, it will work fine. NTFS was first introduced to the consumer market with Windows XP (previous commercial-grade versions of Windows had it as well), so every version of Windows since Windows XP includes NTFS support (and uses it by default). NTFS is also well supported in Slackware with the NTFS-3G driver (in your /etc/fstab, use ntfs-3g as the filesystem type). NTFS has a number of advantages over FAT32 including: files larger than 4GB, permissions, better recovery of errors, and probably lots more. I would also recommend formatting that NTFS partition in Windows. Linux supposedly has support for formatting NTFS, but everytime I've tried it, Windows has been unable to read it. Formatting it in Windows has always allowed both Windows and Linux to read and write to the drive without issues.
And writing to the MBR using lilo will work fine no matter if the drive is internal or external. It all depends on what drive you set as your boot drive in your lilo.conf. That will be where the MBR will be written. See the guide I linked above on what you need to do to swap your fstab and lilo.conf over to UUIDs. You will need that if you want to boot it on multiple systems (since the external might be /dev/sdb on your system, but it might be /dev/sdd on another, which will cause a kernel panic unless everything is referenced by UUID).
It is certainly possible to use UUID (and you're right in that it would need to be used in this case since the drive mappings would likely change on different computers). He'll need to have both /etc/lilo.conf and /etc/fstab converted to UUIDs (or labels, but UUIDs are more likely to be unique). See my post here on what needs to be done to use UUID in your lilo.conf (and your fstab -- this should be a complete solution to switch your system to UUID).
Yup, it will work fine. NTFS was first introduced to the consumer market with Windows XP (previous commercial-grade versions of Windows had it as well), so every version of Windows since Windows XP includes NTFS support (and uses it by default). NTFS is also well supported in Slackware with the NTFS-3G driver (in your /etc/fstab, use ntfs-3g as the filesystem type). NTFS has a number of advantages over FAT32 including: files larger than 4GB, permissions, better recovery of errors, and probably lots more. I would also recommend formatting that NTFS partition in Windows. Linux supposedly has support for formatting NTFS, but everytime I've tried it, Windows has been unable to read it. Formatting it in Windows has always allowed both Windows and Linux to read and write to the drive without issues.
And writing to the MBR using lilo will work fine no matter if the drive is internal or external. It all depends on what drive you set as your boot drive in your lilo.conf. That will be where the MBR will be written. See the guide I linked above on what you need to do to swap your fstab and lilo.conf over to UUIDs. You will need that if you want to boot it on multiple systems (since the external might be /dev/sdb on your system, but it might be /dev/sdd on another, which will cause a kernel panic unless everything is referenced by UUID).
Alright, I will give this a try. I am on Winter break now, so I have time. Thank you
I have an external, 250gb, drive that boots to Slackware 14.1 using an ext4 filesystem with partitions for /root, /home and swap can't see why an extra partition should be a problem as long as you don't overwrite it!
Looking at my notes I did something like this-
Install Slackware to the external drive - don't shutdown or reboot, don't install grub2 or lilo
The new installation will be mounted on /mnt so chroot to it
Code:
chroot /mnt
mount /proc
Use uuids in fstab. You might want to break the following into manual steps. Just make sure you take a backup of fstab and inspect the final results
Code:
cd /etc
#Make a backup of fstab
cp -p fstab fstab.$(date +"%Y%m%d.%H%M%S").bak
#Substitute the device names for uuids in fstab
cat fstab | while read line
do
EDIT_STRING=$(blkid -n ext4 $(echo $line | awk '{print $1}') | awk '{print "s~"$1"~"$2"~"}' | tr -d ":" )
if [[ ! -z $EDIT_STRING ]];then
echo $EDIT_STRING
sed -i "$EDIT_STRING " fstab
fi
done
# see what's changed in fstab
diff fstab.bak fstab
#The expected results from the diff should look similar to this -
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.