Query about hard disk's file system & pen drive's filesystem
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Query about hard disk's file system & pen drive's filesystem
I have a query about hard disk's file system & pen drive's filesystem.
If I boot through pendrive and reach on the desktop using "Try ubuntu without installation" option. Now here I open the terminal and install some packages like apache2, mysql, movie player plugins, postfix etc (These packages are not installed in my hard disk.). Will they be installed in the /dev/sda1 (my hard disc filesystem) or will they be installed in /dev/sdb1 (pendrive's filesystem)?
If they are installed in pen drive's filesystem, can I use them when I boot with pendrive next time using "Try ubuntu without installation" option?
If they are installed in my hard disk's filesystem so I need not to install these packages in hard disk separately, is it correct?
Depends how you created the Live USB. We are not mind-readers, so tell us: how did you do it, what steps did you take?
Assuming you created the standard Live USB using Unetbootin or similar, any apps you install will be installed in your RAM and disappear when you power down the computer. It is just like a Live CD: completely non-persistent, all changes (installed apps, created documents, modified settings) are lost when you power down.
On the other hand if you used the Ubuntu usb-creator app and chose to create "persistence" (under "Stored in reserved space" move the "how much" slider to the right) then your installed apps, created documents, etc. will be stored to the pen drive (/dev/sdb1) and available next time you boot from the pen drive.
Under no circumstances will Ubuntu store/modify anything on your internal hard drive until/unless you specifically tell it to do so.
Yes, you are absolutely mind reader, No doubt, you caught this.
I booted my pendrive using Unetbootin and I am trying to boot this using "Try ubuntu" option and I have installed some packages in it.
I want to use them again using pendrive.
but you said if I want to do this using pendrive, I have to use Ubuntu usb-creator app.
I have searched this on google but could not get perfect link.
can you please suggest me how to use installed packages in pendrive always, if you have link, please paste here.
If I am not enough clear again, please comment.
One more thing you said if I specify I can install packages in hard disk although I have booted through pendrive. Please suggest how to do so.
If I have booted my system through pendrive, what instructions should I give on terminal so it will install all my packages in hard disk (/dev/sda1). Please comment on this.
It will be really really appreciated.
Last edited by bloodstreetboy; 03-23-2013 at 09:40 AM.
It used to be that the Ubuntu live{cd,USB} gave you the option to boot into an installed system on a hard disk - would have been exactly what was requested by the OP. Looking at the Ubuntu site, it seems this is no longer the case.
To achieve this you would need to boot into the liveUSB and mount your (hard-disk) root partition and chroot into the hard disk system. From the same site as above, here is an article that has the details. It's about re-installing grub2, but just go down to the section "via ChRoot". Read everything down to (including) step 9 - if you don't have RAID you can ignore those instructions.
Once confident you can do it correctly, do as it instructs (down to step 9) - once you have chroot'd, you can use apt-get to install into the hard disk system. At your own risk.
Thank you for the manual, I have read it completely and it looks like it can be done through chroot.
But I haven't tried it, it looks little scary.
I want to confirm it first here before doing anything.
I have booted through my system and my original file system is mounted in /media as BB2C-4330
so if I want to access my old (original) file system through command line, I can use
Code:
# cd /media/BB2C-4330
But if I want to make it primary filesystem, I am going to run following commands.
Code:
# sudo mount /dev/sda1 /mnt
sudo chroot /mnt
Are they correct?
Now I want to install packages here in /dev/sda1, I don't want to install them in /dev/sdb1 (my pen drive filesystem)
Now if I open terminal, Has my secondary filesystem become primary?
Please confirm.
But if I want to make it primary filesystem, I am going to run following commands.
# sudo mount /dev/sda1 /mnt
sudo chroot /mnt
No. If it is already mounted at: /media/BB2C-4330; there is no need to mount it again and you will probably get an error indicating it can't be mounted because it already is.
The chroot command, you are missing the step 8 instructions from the link posted above. You need those.
Curious as to why you don't just boot the installed system on sda1, is it not bootable? To access the software on sda1 from your flash, you will need this process each time you boot as the unetbootin software creates a system which is read-only unless you add persistence.
No. If it is already mounted at: /media/BB2C-4330; there is no need to mount it again and you will probably get an error indicating it can't be mounted because it already is.
The chroot command, you are missing the step 8 instructions from the link posted above. You need those.
Curious as to why you don't just boot the installed system on sda1, is it not bootable? To access the software on sda1 from your flash, you will need this process each time you boot as the unetbootin software creates a system which is read-only unless you add persistence.
Thanks for your reply...
The problem is, I am not able to reach on command line using my hard disk's file system whether I use recovery mode or what ever. I want to install some packages in my hard disk.
I have only way to reach on command line is bootable pen drive but here if I install packages, it installs in pen drive's file system.
I want to install them in hard disk's filesystem. That's why I want to chroot my hard disk's file system so it will become primary and my packages will be installed in it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.