ignore hard drive at startup

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jerrylanejohns

ignore hard drive at startup

Post by jerrylanejohns »

I need to run entirely from my USB drive as I'm using a computer for work to run Linux (I'm subversive...)

When Mint starts up, I notice that it hits the hard drive momentarily and continues to do that occasionally.

Can I modify the start up script to make Mint not even know the hard drive is there?

If so, can someone give me the steps to do it?

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
JasonLG

Re: ignore hard drive at startup

Post by JasonLG »

jerrylanejohns wrote:I need to run entirely from my USB drive as I'm using a computer for work to run Linux (I'm subversive...)

When Mint starts up, I notice that it hits the hard drive momentarily and continues to do that occasionally.

Can I modify the start up script to make Mint not even know the hard drive is there?

If so, can someone give me the steps to do it?

Thanks.
You can install Mint directly to a USB thumb drive(as I think you've done already?) and if done right Mint won't touch the internal hard drive. I'll walk you through it.
1. Get yourself a reasonably fast USB thumb drive, 4GB or larger(8GB or larger is recommended)

2. Boot off the LiveCD.

3. Install Mint to the USB drive.
__A. Use Ext2 as a file system to minimize read/writes to the thumb drive so it'll last longer.(no journaling)
__B. Give yourself some swap space but not too much. Depending on the amount of RAM of the surrogate computer as little as 100MB but no more than 1GB.
__C. Make sure to install GRUB on the USB stick NOT the internal hard drive.

4. Boot off your fresh USB install.

5. Now we'll optimize your fstab and swappiness a little to again minimize read/writes to your thumb drive to extend it's life.
__A. Change the swappiness by entering this in the terminal.

Code: Select all

gksu gedit /etc/sysctl.conf   
Add this to the bottom of the file and save and close it.

Code: Select all

vm.swappiness=10
__B. Move tmp and log files to RAM by entering this in a terminal.

Code: Select all

gksu gedit /etc/fstab
Add this to the bottom of the file.

Code: Select all

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 
tmpfs /var/log/apt tmpfs defaults,noatime 0 0
Note: If you installed to your USB from a computer that was running Linux there might be a reference in your fstab to the swap partition from that system, if so delete it.
In any case save and close fstab.

6. Restart your USB install for all the changes to take effect.

7. Customize your new install to your liking.

That's it, you should now have a truly persistent USB Mint install that should boot and run on any computer that supports USB booting(and some that don't using plop http://www.plop.at/) and Mint that never touches the hard drive(unless you want to).
Txnca

Re: ignore hard drive at startup

Post by Txnca »

JasonLG wrote:
5. Now we'll optimize your fstab and swappiness a little to again minimize read/writes to your thumb drive to extend it's life.
__A. Change the swappiness by entering this in the terminal.

Code: Select all

gksu gedit /etc/sysctl.conf   
Add this to the bottom of the file and save and close it.

Code: Select all

vm.swappiness=10
__B. Move tmp and log files to RAM by entering this in a terminal.

Code: Select all

gksu gedit /etc/fstab
Add this to the bottom of the file.

Code: Select all

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 
tmpfs /var/log/apt tmpfs defaults,noatime 0 0
Note: If you installed to your USB from a computer that was running Linux there might be a reference in your fstab to the swap partition from that system, if so delete it.
In any case save and close fstab.

6. Restart your USB install for all the changes to take effect.

7. Customize your new install to your liking.

That's it, you should now have a truly persistent USB Mint install that should boot and run on any computer that supports USB booting(and some that don't using plop http://www.plop.at/) and Mint that never touches the hard drive(unless you want to).

I do realize that I would have to change the editor, but will the above work if I am using LXDE? Hopefully it will, as I am trying it right now. Funny thing is I don't have a HDD in this laptop. It died on me so I had been using a LiveCD to boot and work on it. Then I realized that I could install it on a MicroSD card and here I am running it that way. :lol: Anyway, thanks for the lesson.
JasonLG

Re: ignore hard drive at startup

Post by JasonLG »

Txnca wrote:
JasonLG wrote:
5. Now we'll optimize your fstab and swappiness a little to again minimize read/writes to your thumb drive to extend it's life.
__A. Change the swappiness by entering this in the terminal.

Code: Select all

gksu gedit /etc/sysctl.conf   
Add this to the bottom of the file and save and close it.

Code: Select all

vm.swappiness=10
__B. Move tmp and log files to RAM by entering this in a terminal.

Code: Select all

gksu gedit /etc/fstab
Add this to the bottom of the file.

Code: Select all

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 
tmpfs /var/log/apt tmpfs defaults,noatime 0 0
Note: If you installed to your USB from a computer that was running Linux there might be a reference in your fstab to the swap partition from that system, if so delete it.
In any case save and close fstab.

6. Restart your USB install for all the changes to take effect.

7. Customize your new install to your liking.

That's it, you should now have a truly persistent USB Mint install that should boot and run on any computer that supports USB booting(and some that don't using plop http://www.plop.at/) and Mint that never touches the hard drive(unless you want to).

I do realize that I would have to change the editor, but will the above work if I am using LXDE? Hopefully it will, as I am trying it right now. Funny thing is I don't have a HDD in this laptop. It died on me so I had been using a LiveCD to boot and work on it. Then I realized that I could install it on a MicroSD card and here I am running it that way. :lol: Anyway, thanks for the lesson.
It should work just fine, as far as I know those files are the same regardless of DE.
User avatar
GoustiFruit
Level 4
Level 4
Posts: 269
Joined: Wed Sep 12, 2007 11:07 am

Re: ignore hard drive at startup

Post by GoustiFruit »

JasonLG wrote:4. Boot off your fresh USB install.
This is where my experience stopped: it won't boot, I'm stuck with the gray "Mint 10" background !

Any idea what to do from this point ? How to get at least some informations on what is going wrong ? BTW I had to use "nomodeset" to be able to boot from the LiveCD, but from the USB drive it doesn't change anything (LM 10 RC, 64 bits).

PS: I was able to install and boot PCLinuxOS on this same USB drive, but would prefer to use Mint...
JasonLG

Re: ignore hard drive at startup

Post by JasonLG »

GoustiFruit wrote:
JasonLG wrote:4. Boot off your fresh USB install.
This is where my experience stopped: it won't boot, I'm stuck with the gray "Mint 10" background !

Any idea what to do from this point ? How to get at least some informations on what is going wrong ? BTW I had to use "nomodeset" to be able to boot from the LiveCD, but from the USB drive it doesn't change anything (LM 10 RC, 64 bits).

PS: I was able to install and boot PCLinuxOS on this same USB drive, but would prefer to use Mint...
I'm sorry I can't really help you, for one I don't have any experience with the whole "nomodeset" issue and two I've never made a USB stick of Mint 10 x64. From what I understand Plymouth doesn't play well with some chipsets. I'll see what happens when I completely remove it from my USB stick install and get back to you on that.
User avatar
GoustiFruit
Level 4
Level 4
Posts: 269
Joined: Wed Sep 12, 2007 11:07 am

Re: ignore hard drive at startup

Post by GoustiFruit »

Ok thanks, waiting for your feedback :-)
Locked

Return to “Installation & Boot”