LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 12-27-2012, 12:20 PM   #1
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123
Blog Entries: 12

Rep: Reputation: 5
basic question about naming a partition


I used this command:
root@host:/dev# cp /dev/sdb1 /dev/LFS

got this message:
cp: writing `/dev/LFS': No space left on device

How do I rename the partition to LFS? I'm sure it's simple.
 
Old 12-27-2012, 12:24 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,568

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Lets hold up a minute here, what exactly are you trying to do? It looks like you want to make a flat file copy of your entire drive, this is not going to work due to file locks and other issues.

Give us some background info on what you are trying to accomplish.
 
Old 12-27-2012, 01:00 PM   #3
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123
Blog Entries: 12

Original Poster
Rep: Reputation: 5
Fair enough: In the LFS manual they refer to a partition as the LFS partition. (http://www.linuxfromscratch.org/lfs/.../mounting.html) They use the command:
export LFS=/mnt/lfs

oh, oops, I just realized ... they're naming the variable aren't they? That will become a directory in the LFS partition? (bash has no man entry for export)

next I'll be doing:
mkdir -pv $LFS ....... -p will make the variable LFS a parent directory, -v lets me know it worked?

then:
mount -v -t ext3 /dev/<xxx> $LFS .... <xxx> will be sdb1 (no need to change file name then), -v lets me know it worked?
-t ext3 is to mount an ext3 type file system located at /dev/sdb1 and it will be called:
/mnt/lfs ?
I think I got it now, sorry, did I miss anything?
 
1 members found this post helpful.
Old 12-27-2012, 02:39 PM   #4
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 651

Rep: Reputation: 269Reputation: 269Reputation: 269
/dev/sdb1 is a device file (probably for the first partition of your second SATA drive, but may depend on your udev configuration. It is a handle to your partition as a physical device. Reading from it will get you raw data from that partition, including formatting and other filesystem stuff, as fragmented as your data there happens to be (usually not much on linux).

/mnt/lfs is a directory in your filesystem hierarchy. That's where you mount the partition. That will make the logical structure (hierarchy files, directories) stored on that partition, appear in your filesystem as if those files and directories were in the /mnt/lfs directory.

export $LFS=/mnt/lfs will create an environment variable called LFS (because $LFS is faster to type than /mnt/lfs). export makes sure that all child processes of your shell will inherit this variable. So, whenever you type $LFS in your terminal, the shell will replace it with /mnt/lfs.

If you are not familiar and comfortable with basics of unix, shell scripting, partitioning, compiling and installing programs using GNU tools (configure, make, etc.) I would advise that you spend some time studying those before you try to build LFS. This site has a lot of interesting information to learn (So does LQ.org, of course ). The process of building LFS will take you down a road where you will encounter things much more complex than this and while you can probably build the system successfully without having a clue about what's going on just by copy and pasting commands from the LFS manual, you would probably not learn much by doing so. And learning is the main point behind building LFS. Also, an unfortunate mistake can easily destroy your data, if you have another system installed on that computer.
Anyway, good luck with your linux experience.
 
2 members found this post helpful.
Old 12-27-2012, 07:44 PM   #5
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123
Blog Entries: 12

Original Poster
Rep: Reputation: 5
@millgates
Quote:
If you are not familiar and comfortable with basics of unix,
Does a reasonable comfort with the basics of Linux count as from: http://linuxnewbieguide.org/
Quote:
shell scripting, partitioning, compiling and installing programs using GNU tools
Is a superficial knowledge of Paul sheer's "Linux: Rute User's" book from http://rute.2038bug.com/index.html.gz, being able to use vim enough (sdb1 is ext3 by the way which I set up using GNU parted and made it ext3 from the command line and already has $LFS/sources with the md5sum sums checked using a little script I edited with vim and ran as a shell script using chmod 755
Quote:
I would advise that you spend some time studying those before you try to build LFS.
What's wrong with studying other Linux resources and make LFS part of the learning process?
Quote:
will take you down a road where you will encounter things much more complex than this and while you can probably build the system successfully without having a clue about what's going on just by copy and pasting commands from the LFS manual,
What's wrong with studying topics as they arise in the LFS build and allow the build to generate topics and questions in an applied context (more interesting than looking at man in bash with no intended application)?
Quote:
you would probably not learn much by doing so. And learning is the main point behind building LFS.
We agree on that. Thus, by not attempting the LFS build I would get what I've always got because I'll be doing what I've always done. Also LQ.org people have been kind, helpful, supportive, and generally positive ... and have already enriched the learning process.
Quote:
Also, an unfortunate mistake can easily destroy your data, if you have another system installed on that computer.
Anyway, good luck with your linux experience.
Anytime someone works from command as # runs that risk. Is there a particular pitfall I need to watch out for? Thank you for wishing me luck ... I sincerely hope you will continue to comment on my questions as I can use all the help I can get.
 
Old 12-28-2012, 11:10 AM   #6
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 651

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by DavidLee1A View Post
Does a reasonable comfort with the basics of Linux count as from: http://linuxnewbieguide.org/
This looks like a nice overview of linux, but it doesn't seem to go much beyond installing and using the GUI.

Quote:
Originally Posted by DavidLee1A View Post
Is a superficial knowledge of Paul sheer's "Linux: Rute User's" book from http://rute.2038bug.com/index.html.gz,
Yes, this looks like a very good resource.

Quote:
Originally Posted by DavidLee1A View Post
(sdb1 is ext3 by the way which I set up using GNU parted and made it ext3 from the command line and already has $LFS/sources with the md5sum sums checked using a little script I edited with vim and ran as a shell script using chmod 755
Good job!


Quote:
Originally Posted by DavidLee1A View Post
What's wrong with studying other Linux resources and make LFS part of the learning process?
What's wrong with studying topics as they arise in the LFS build and allow the build to generate topics and questions in an applied context (more interesting than looking at man in bash with no intended application)?
Nothing wrong with that. I don't know how experienced user you are and I didn't mean to imply that you are not up to the task. I just wanted to warn you and suggest that you go your linux road one step at a time. Building LFS is a long process, and often a very frustrating one, as one missed step can leave you with something that doesn't work much later on in the process with very little clue about what's wrong.

Quote:
Originally Posted by DavidLee1A View Post
Anytime someone works from command as # runs that risk. Is there a particular pitfall I need to watch out for?
Nothing particular. Watch out for typos, don't confuse backticks with single quotes, backup your data.

I certainly hope you will enjoy the process and learn a lot from it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic question regarding rpm naming convention. pinga123 Linux - Newbie 2 03-17-2011 12:52 AM
solaris partition naming dasy2k1 Solaris / OpenSolaris 14 12-27-2007 09:55 AM
disc partition naming dasy2k1 Solaris / OpenSolaris 6 05-25-2007 09:00 AM
Is there a way to have grub translate its own naming to naming scheme under Linux zhjim Linux - Software 6 05-28-2006 08:09 AM
Two questions: Old hardware(486) and partition-naming. Megamieuwsel *BSD 2 04-27-2004 04:06 PM


All times are GMT -5. The time now is 07:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration