Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Hi, I have system (Ubuntu 10.10) on my pendrive.
I want to use this system always from this pen - by boot on startup.
If I remove all of my hard disk from laptop and boot from pendrive - everything is ok,
but when i try boot from pen when hard disks are plugged - its not working - because linuks want pass to sda2 partition,
and this partition is already assign to wrong disk (should be in pendrive).
I have crypt(luks) and lvm on this pen.
I just want to make sure that my pendrive will be always shown as "sda" - how i can do this? I think it will probably fix my problem.
And second question:
How to disable mount other disk - mount only this pendrive.
What is your exact problem? I ask because you can not directly "force" a device to have a specified device name in linux. Your best bet is to find out what device name is being set for your flash drive, and work from there.
As far as your second question, could you explain a bit better by what you mean?
I just want to mount only pendrive and not using another disk from laptop.
Or mount it after pen.
It's quite strange that i can't force pendrive to "sda".
----
problem is when other disk are in my laptop
when linuks starts he wants to pass (luks-lvm) to decrypt partition.
He wants to decrypt sda2 - it should be one of pendrive partition, but its only on pendrive
when therse no another drives.
When other disk are mounted pendrive is not anymore sda - so i nedd to force it
Use UUIDs instead of device descriptors and you should be fine. I don't know much about LUKS, but a short search on the web showed me that it can be used with UUIDs.
yes i know that, but i just don't want to mess with crypttab & fstab because after that update-initramfs make somethink wrong and whole pendrive just go down.
I think TobiSG is right about using UUIDs. Just forcing a device to be sda would have to be done with some sort of unique descriptor anyway. That's why we have UUIDs in the first place.
I have done something like what you are trying to do using Debian/LILO on an SD card. If you like I could post some example configuration files later. I have a "live" bootable Linux on an SD card now that is independant of what computer i place it into.
when im trying to change lines to UUID and comment previous and i'm initialize:
Code:
# sudo update-initramfs -k all -c
everything its going wrong - i just can to type password on start anymore.
Sometimes - when im try to edit pendrive-system from another linuks (vmware ubuntu 10.10) by typing:
Code:
cd /mnt
sudo mkdir root
sudo mount -t ext3 /dev/mapper/vg-root /mnt/root
sudo mount -t ext2 /dev/sdb1 /mnt/root/boot
sudo mount -t ext3 /dev/mapper/vg-home /mnt/root/home
sudo chroot /mnt/root
mount -t proc proc /proc
mount -t sysfs sys /sys
mount -t devpts devpts /dev/pts
gedit /etc/crypttab #editing crypttab
gedit /etc/fstab #editing fstab
sudo update-initramfs -k all -c
after "update-initramfs -k all -c" i got info - somthing like this:
Code:
cryptsetup: WARNING: invalid line in /etc/crypttab -
what can i do to use UUID ?
my etc/default/grub is here:
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
for crypt and lvm im using this tutorial - and everything is fine, when i just don't have more disk-drives, only this pendrive.
so what i need to do is only change to UUID, or make my pendrive as "sda"
---------
and another strange error when im trying update-initramfs under pendrive system - when im usung it (maybe i cannot update this when im using this system) :
cpio: not implemented or invalid option --
E: mkinitramfs failure find 141 cpio 1 gzip 0
/etc/default/grub looks empty. Post /boot/grub/grub.cfg instead
Basically you have to :
Add # to the /dev/sdX lines and remove # from the UUID or /dev/disk/by-uuid lines, in fstab and crypttab
Change root=/dev/sdX to root=/dev/disk/by-uuid/X in the kernel line in grub
I see there is some /dev/mapper stuff in fstab, so maybe you use LVM or something like that. I am not familiar with LVM and maybe doing what i said to a LVM system can render it unbootable
You can try. If you damaged your system and it won't boot, start the computer ith a live USB or CD and change everything back in all the files
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.