ignore hard drive at startup

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

ignore hard drive at startup

Postby jerrylanejohns on Thu Oct 07, 2010 10:33 pm

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.
jerrylanejohns
Level 1
Level 1
 
Posts: 4
Joined: Thu May 06, 2010 1:59 pm

Linux Mint is funded by ads and donations.
 

Re: ignore hard drive at startup

Postby JasonLG on Fri Oct 08, 2010 3:01 am

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).
"I see" said the blind man to the deaf man who stuck his wooden leg out the window to check the weather.
JasonLG
Level 7
Level 7
 
Posts: 1624
Joined: Thu May 20, 2010 9:15 pm
Location: Polk City, Iowa USA

Re: ignore hard drive at startup

Postby Txnca on Fri Oct 22, 2010 7:51 pm

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.
Asus P5E MB/Intel C2D E8400@3Ghz/6GB Corsair Dominator DRAM/nVidia 8800GT 512MB
8xHDD 3.82TB
LG 22x DVD Burner
Logitec 5.1 Speakers/High Def Sound
Antec Tower/480w PSU
Samsung 22" LCD Monitor
APC 1300-XS UPS
User avatar
Txnca
Level 3
Level 3
 
Posts: 186
Joined: Thu Mar 18, 2010 9:30 am
Location: Ontario Canada VIA Texas

Re: ignore hard drive at startup

Postby JasonLG on Mon Oct 25, 2010 4:10 am

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.
"I see" said the blind man to the deaf man who stuck his wooden leg out the window to check the weather.
JasonLG
Level 7
Level 7
 
Posts: 1624
Joined: Thu May 20, 2010 9:15 pm
Location: Polk City, Iowa USA

Re: ignore hard drive at startup

Postby GoustiFruit on Tue Oct 26, 2010 7:07 am

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...
User avatar
GoustiFruit
Level 4
Level 4
 
Posts: 253
Joined: Wed Sep 12, 2007 11:07 am

Re: ignore hard drive at startup

Postby JasonLG on Tue Oct 26, 2010 7:17 am

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.
"I see" said the blind man to the deaf man who stuck his wooden leg out the window to check the weather.
JasonLG
Level 7
Level 7
 
Posts: 1624
Joined: Thu May 20, 2010 9:15 pm
Location: Polk City, Iowa USA

Re: ignore hard drive at startup

Postby GoustiFruit on Tue Oct 26, 2010 9:14 am

Ok thanks, waiting for your feedback :-)
User avatar
GoustiFruit
Level 4
Level 4
 
Posts: 253
Joined: Wed Sep 12, 2007 11:07 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: all41, Eric2.0 and 12 guests