Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 20:34
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
mount 2nd harddrive at boot up
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
paullecorde


Joined: 17 Jun 2005
Posts: 62
Location: Lexington, KY USA

PostPosted: Mon 17 Oct 2005, 12:46    Post_subject:  mount 2nd harddrive at boot up  

I have added a second hard drive to my Puppy PC. I want Puppy to mount this drive at boot up. I have added script /etc/rc.d/ to connect to broadband at boot up and to modprobe for sound. Is this the same place I would add script to mount drives at boot up and what script do I use?
From searching the internet I am thinking
mount /dev/hdb1 /mnt/data
(data is the name the mount wizard gives to this drive when I use it to mount the drive once Puppy is running).

Thank you for any suggestions!
Back to top
View user's profile Send_private_message YIM 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 17 Oct 2005, 13:30    Post_subject:  

Basically this looks ok, but Drives should be unmounted, when Puppy shuts down.

I had no look at how Puppy does it, maybe that drive will be ignored.
Simply try, and watch the messages you get at shutdown.

Mark
Back to top
View user's profile Send_private_message Visit_website 
puppian


Joined: 18 Jul 2005
Posts: 538
Location: PuppyLand

PostPosted: Mon 17 Oct 2005, 15:36    Post_subject:  

You can make a script file to mount your other partitions. This is what I'll show you how to do.

Taking the information I gathered from mount and probepart, I want to mount hda1 hda5 hda6, I'll call the script file /root/my-applications/bin/mhd
Code:
#!/bin/sh
# I can make my own mount points
mkdir /mnt/dos
mount -t vfat /dev/hda1 /mnt/dos
# I can also use the predefind ones as shown below
mount -t ext2 /dev/hda5 /mnt/linux2
mount -t ext2 /dev/hda6 /mnt/linux3

Before I reboot the computer, I need to unmount the devices, so I make another script to unmount the devices. I'll call it /root/my-applications/bin/uhd
Code:
#!/bin/sh
umount /mnt/dos
umount /mnt/linux2
umount /mnt/linux3

In order for the scripts to be executable, the file properties need to be set. I generally use 755 (owner=rwx, group=rx, other=rx).

# chmod 755 /root/my-applications/bin/mhd

I hope this helps. And as you know, there are many valid ways to mount devices. This is just one of many.

You can run these scripts on the command line, make shortcuts on the desktop with Rox, or make menu items for them.

==========

The above is copied from this page:
http://www.goosee.com/puppy/wikka/MounTing

If you have many partitions on your harddrive (e.g hdx10 or more), you'll need to add something like this too:
mknod /dev/hdb12 b 3 76

Code:

# mknod
BusyBox v0.60.5 (2004.09.18-02:04+0000) multi-call binary

Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR

Create a special file (block, character, or pipe).

Options:
        -m      create the special file using the specified mode (default a=rw)

TYPEs include:
        b:      Make a block (buffered) device.
        c or u: Make a character (un-buffered) device.
        p:      Make a named pipe. MAJOR and MINOR are ignored for named pipes.

The value of major and minor can be found in the file /proc/partitions

==========

To auto-mount on start up, put
Code:
mhd &

before the line
Code:
CURRENTWM="`cat /etc/windowmanager`"

in the file /root/.xinitrc

You can write a script to auto-unmount too, e.g,
Code:
#!/bin/sh
#  Command to shutdown the system
umount /mnt/dos
umount /mnt/linux2
umount /mnt/linux3
icewmpoweroff

save it as 'shutdownIce' and make it executable.

To set hotkey, put this line in /root/.icewm/keys
Code:
key "Ctrl+Alt+F4"      shutdownIce

_________________
Puppylinux.org - Community home page of Puppy Linux hosted by Barry (creator of Puppy), created and maintained by the Puppy Linux Foundation since 2005
Back to top
View user's profile Send_private_message Visit_website 
paullecorde


Joined: 17 Jun 2005
Posts: 62
Location: Lexington, KY USA

PostPosted: Mon 17 Oct 2005, 23:14    Post_subject:  

Thanks. The mhd and uhd scripts appear to be working.....
Back to top
View user's profile Send_private_message YIM 
puppian


Joined: 18 Jul 2005
Posts: 538
Location: PuppyLand

PostPosted: Tue 18 Oct 2005, 12:29    Post_subject:  

You're welcome Smile
_________________
Puppylinux.org - Community home page of Puppy Linux hosted by Barry (creator of Puppy), created and maintained by the Puppy Linux Foundation since 2005
Back to top
View user's profile Send_private_message Visit_website 
Dranoweb


Joined: 12 Apr 2009
Posts: 4
Location: Australia

PostPosted: Sun 12 Apr 2009, 03:55    Post_subject:  

I found that adding these scripts into the /root/startup dir worked more reliably.

I also discovered that if you connected at boot, one can automount USB sticks too.

I had however set the "vfat" to "ntfs" for my fixed disk and "auto" for the usb.

adding the line to /root/.xinitrc did not appear to work for me.

Keep in mind I'm still new to puppy.

I'm using puppy 4.2 having migrated from 4.1.2

Installed on a 2gb usb stick in superfloppy mode.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0567s ][ Queries: 11 (0.0047s) ][ GZIP on ]