Re: Guessing filesystem while unmounted
On Tue, Feb 18, 2003, Ira Abramov wrote about "Re: Guessing filesystem while unmounted": > Quoting [EMAIL PROTECTED], from the post of Tue, 18 Feb: > > That was unintentional and might go to show my point that I couldn't > > tell (or it was very obscure to me) whether your message was private > > or public. > > if your MUA is so "dumbed down" that you can't tell if a mail was sent > to you, the list or both, it means it's hiding the recipiænt headers, so > what's left of the message? It means that when somebody knows the "r"eply doesn't work on linux-il and is always used to add the CC: back to the list himself, he can accidentally do that even on messages that just appear to have come from the list (because of the people involved) but infact haven't. I'm not saying that's what happened in this case, but it's a possibility. I use "group reply" instead of an explicit CC:, but not everyone does! See also your (Ira) own complaints that people take messages he sent to iglu.org.il and respond to them in linux.org.il. See - when people complain that Reply-To: causes embarrassing mistakes, they forget that such things also happen without it. This guy (may have) accidentally replied on the list. I once got legal threats for having used "group reply" (the jobinfo incident). Now, let's drop this issue - it has barely been a month since we last argued it :( And Shachar - this time it's not my fault we're arguing this :) -- Nadav Har'El| Tuesday, Feb 18 2003, 16 Adar I 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |What did the Buddhist say to the hot dog http://nadav.harel.org.il |vendor? Make me one with everything. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
No, I just press, as always, "reply all" which doesn't include the mailing list's address but only the sender's address. Here are the headers of your current message: Received: from webcollage.com (199.203.179.226 [199.203.179.226]) by athena.elseweb.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id F1KQ20SV; Tue, 18 Feb 2003 15:23:11 +0200 Received: from mailshell.com (www8.mailshell.com [209.157.66.242]) by webcollage.com (8.9.3+Sun/6.2.1) with SMTP id PAA11141 for <[EMAIL PROTECTED]>; Tue, 18 Feb 2003 15:22:50 +0200 (IST) X-Webcollage-User: <[EMAIL PROTECTED]> Received: (qmail 28818 invoked by uid 76); 18 Feb 2003 13:22:45 - Resent-Date: 18 Feb 2003 13:22:45 - Resent-Message-ID: <[EMAIL PROTECTED]> Bounce-To: [EMAIL PROTECTED] Resent-To: [EMAIL PROTECTED] Resent-From: [EMAIL PROTECTED] Reply-To: "Ira Abramov" <[EMAIL PROTECTED]> From: "Ira Abramov" <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] X-Apparently-From: [EMAIL PROTECTED] Received: (qmail 28807 invoked from network); 18 Feb 2003 13:22:45 - Received: from dev211.mailshell.com (HELO mailshell.com) (10.1.3.211) by dev120.mailshell.com with SMTP; 18 Feb 2003 13:22:45 - Received: (qmail 23047 invoked by uid 99); 18 Feb 2003 13:22:45 - Received: (qmail 22712 invoked from network); 18 Feb 2003 13:22:34 - Received: from unknown (HELO cs.huji.ac.il) (132.65.16.30) by mail.mailshell.com with SMTP; 18 Feb 2003 13:22:34 - Received: from localhost ([127.0.0.1] helo=cs ident=listar) by cs.huji.ac.il with esmtp id 18l7b4-00066T-00; Tue, 18 Feb 2003 15:15:42 +0200 Received: with LISTAR (v0.124a; list linux-il); Tue, 18 Feb 2003 15:14:53 +0200 (IST) Received: from iglu.org.il ([192.117.122.34]) by cs.huji.ac.il with smtp id 18l7aE-00062m-00 for [EMAIL PROTECTED]; Tue, 18 Feb 2003 15:14:50 +0200 Received: (qmail 9646 invoked by uid 200); 18 Feb 2003 13:00:09 - Delivered-To: [EMAIL PROTECTED] Received: (qmail 9637 invoked from network); 18 Feb 2003 13:00:08 - Received: from line133-133.adsl.actcom.co.il (HELO stimpy.scso.com) (192.115.133.133) by iglu.org.il with SMTP; 18 Feb 2003 13:00:07 - Received: (qmail 17547 invoked by uid 1000); 18 Feb 2003 13:13:49 - Date: Tue, 18 Feb 2003 15:13:49 +0200 Subject: Re: Guessing filesystem while unmounted Message-ID: <[EMAIL PROTECTED]> Mail-Followup-To: [EMAIL PROTECTED] References: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1255 Content-Transfer-Encoding: 8bit Content-Disposition: inline In-Reply-To: <[EMAIL PROTECTED]> X-message-flag: 'Yo! Get yourself a real email client. mutt.org' Precedence: list X-listar-version: Listar v0.124a X-original-sender: [EMAIL PROTECTED] Precedence: bulk X-list: linux-il X-Apparently-To: dev120-amos-linux_il X-JUNK1: -3 --- "Reply all" gave me the following two: Ira Abramov; [EMAIL PROTECTED] Which would be exactly the same if you sent me the message in private, so being used to the drill I just remove the reply-to addresses and put the linux-il alias. And all this is because the "reply-to" address is overriden to be the one of the original poster. I'll try to find a more specific rule for the filter... > -Original Message- > From: Ira Abramov > [mailto:[EMAIL PROTECTED] lshell.com > ] > Sent: Tuesday, February 18, 2003 3:14 PM > To: [EMAIL PROTECTED] > Subject: Re: Guessing filesystem while unmounted > Importance: High > > > Quoting [EMAIL PROTECTED], from the post of Tue, 18 Feb: > > That was unintentional and might go to show my point that I couldn't > > tell (or it was very obscure to me) whether your message was private > > or public. > > if your MUA is so "dumbed down" that you can't tell if a mail was sent > to you, the list or both, it means it's hiding the recipiænt > headers, so > what's left of the message? > > plus, if an Email was sent to you in private and you hit reply, it > should not have reached the list. either you did something you're > embarassed about, or you should be really embarassed of the > mail client. > try a real one. > > -- > For whom the bell tolls > Ira Abramov > > http://ira.abramov.org/email/ This post is encrypted twice > with ROT-13. > Documenting or attempting to crack this encryption is illegal. > > = > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe"
Re: Guessing filesystem while unmounted
Quoting [EMAIL PROTECTED], from the post of Tue, 18 Feb: > That was unintentional and might go to show my point that I couldn't > tell (or it was very obscure to me) whether your message was private > or public. if your MUA is so "dumbed down" that you can't tell if a mail was sent to you, the list or both, it means it's hiding the recipiænt headers, so what's left of the message? plus, if an Email was sent to you in private and you hit reply, it should not have reached the list. either you did something you're embarassed about, or you should be really embarassed of the mail client. try a real one. -- For whom the bell tolls Ira Abramov http://ira.abramov.org/email/ This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
That was unintentional and might go to show my point that I couldn't tell (or it was very obscure to me) whether your message was private or public. > -Original Message- > From: Muli Ben-Yehuda > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 18, 2003 2:26 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: Guessing filesystem while unmounted > > > Dear Amos, > > When I replied privately to you in the message you quote, I did it > for a reason. By replying to the list, you are making tje unforgivable > sin of making private a public correspondence. With every additional > message you send, you take another gigantic leap towards my > killfile. Please halt, turn back, reflect upon your sins, and come > back eventually. Not too soon, though. > > You wrote: > > >>> Because part of supporting open standards is that you > don't have to use > >>> specific software in order to enjoy a forum properly. I > can't use procmail > >>> because right now I read the list on Outlook (that's what > we have at work), > >>> which gives me enough filtering. > > And I replied (privately!) > > >> You need to go back and read what you've said. Really, do it. > >> Because *you* use a substandard MUA, the list should > accomodate your > >> needs, and annoy some (if not all) of the subscribers? Get a shell > >> account somewhere running on a Unix system, or write your > own outlook > >> filter rules or COM plugin, or whateer. I couldn't care less. > > And you had the temerity to reply, on list: > > > Have you seen me ask "why cant people use Outlook" anywere? > > And went on to say: > > > From your previous reply it sounded like the list is > designed only for > > people who can use Procmail. > > s/Procmail/email, and I wholeheartedly agree. You, obviously, are not > a member of that group. > -- > Muli Ben-Yehuda > http://www.mulix.org > http://syscalltrack.sf.net > > > > -- Your email is protected by Mailshell -- > As you requested, this email was forwarded to you by Mailshell. > Mailshell will forward your replies to this email and keep your > private email address safe. > > To unsubscribe safely and easily using Mailshell or to stop > forwarding: > http://www.mailshell.com/control.html?a=blshp8bbumg87yq1j9157q v2pz6_58z35eg0 FreshAddress.com http://rd.mailshell.com/ad482 Earn up to $3 for each of your friends who signs up with Mailshell! http://rd.mailshell.com/sp5 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
Dear Amos, When I replied privately to you in the message you quote, I did it for a reason. By replying to the list, you are making tje unforgivable sin of making private a public correspondence. With every additional message you send, you take another gigantic leap towards my killfile. Please halt, turn back, reflect upon your sins, and come back eventually. Not too soon, though. You wrote: >>> Because part of supporting open standards is that you don't have to use >>> specific software in order to enjoy a forum properly. I can't use procmail >>> because right now I read the list on Outlook (that's what we have at work), >>> which gives me enough filtering. And I replied (privately!) >> You need to go back and read what you've said. Really, do it. >> Because *you* use a substandard MUA, the list should accomodate your >> needs, and annoy some (if not all) of the subscribers? Get a shell >> account somewhere running on a Unix system, or write your own outlook >> filter rules or COM plugin, or whateer. I couldn't care less. And you had the temerity to reply, on list: > Have you seen me ask "why cant people use Outlook" anywere? And went on to say: > From your previous reply it sounded like the list is designed only for > people who can use Procmail. s/Procmail/email, and I wholeheartedly agree. You, obviously, are not a member of that group. -- Muli Ben-Yehuda http://www.mulix.org http://syscalltrack.sf.net = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
> On Tue, Feb 18, 2003 at 01:41:01PM +0200, > [EMAIL PROTECTED] wrote: > > > Why can't people learn to use procmail? it's annoying! > > > > Because part of supporting open standards is that you don't > have to use > > specific software in order to enjoy a forum properly. I > can't use procmail > > because right now I read the list on Outlook (that's what > we have at work), > > which gives me enough filtering. > > You need to go back and read what you've said. Really, do it. Have you seen me ask "why cant people use Outlook" anywere? >From your previous reply it sounded like the list is designed only for people who can use Procmail. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
> -Original Message- > From: Muli Ben-Yehuda > Sent: Tuesday, February 18, 2003 1:29 PM > Cc: [EMAIL PROTECTED] > Subject: Re: Guessing filesystem while unmounted > > > On Tue, Feb 18, 2003 at 11:09:36AM +0200, Arik Baratz wrote: > > > > Why can't the mailing list server put itself in the Reply-To: field? > > It's annoying! > > Why can't people learn to use procmail? it's annoying! Because part of supporting open standards is that you don't have to use specific software in order to enjoy a forum properly. I can't use procmail because right now I read the list on Outlook (that's what we have at work), which gives me enough filtering. --Amos = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Tue, Feb 18, 2003 at 11:09:36AM +0200, Arik Baratz wrote: > > Why can't the mailing list server put itself in the Reply-To: field? > It's annoying! Why can't people learn to use procmail? it's annoying! ObLinux: Alan Cox has decreed that 2.5 is "approaching usability". (My words, not his). Gentlemen, start your engin^Wkernels! -- Muli Ben-Yehuda http://www.mulix.org http://syscalltrack.sf.net = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Tue, Feb 18, 2003, Uri Itscowits wrote about "Re: Guessing filesystem while unmounted": > First I want to thank everybody for the time & effort, > ( although some responses show, > some guys did NOT spend enough time reading my problem all the way {:< ) :) I hope my response wasn't one of those. I did read your message, but frankly it wasn't very easy to understand what you're trying to do. In particular it isn't clear if you are looking for a ad-hoc hack that will work on a particular system, or some universal set of heuristics that will work on old systems (without e2labels, with lilo, bootable Linux partition, etc.) as well as new (with e2labels, grub, etc.). It also wasn't clear why you are so against trying to mount the partitions one by one (the list of partitions is in "fdisk -l", as I said) and checking if they have "/-like" files (/bin/ls, /root, /etc/passwd, etc.). > Since no one gave me a good answer, > (except for Muli's, which was my idea to begin with) Be careful, if you are invested in an answer before you ask the question, you might not be open to better, or at least different, answers ;) > PS > no need to CC me in person, I'm on the list, & it floods my mailbox. Tough luck. Join the pro-Reply-To: crowd (of which I'm a proud member). -- Nadav Har'El| Tuesday, Feb 18 2003, 16 Adar I 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |Microchips: what's left at the bottom of http://nadav.harel.org.il |the bag when it reaches you. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Tue, Feb 18, 2003 at 11:09:36AM +0200, Arik Baratz wrote: > > Why can't the mailing list server put itself in the Reply-To: field? It's annoying! > > > -Original Message- > > From: Yedidyah Bar-David [mailto:[EMAIL PROTECTED]] > [snip] > > > In practice, it happened to me quite many times that a used FAT > > partition was mke2fsed, used (as ext2), and then mounted as > > FAT without > > any errors, by both Linux and Windows, and in almost all > > cases it looked > > empty as FAT. I can also say a very similar scenario is possible with > > NTFS reformatted as ext2. > > I have concocted this one-liner in 5 minutes and didn't test it nearly enough. Hence >my disclaimer in the body of my message. No problem :-) > > What does the 'file' command say to that old-FAT-turned-ext2 FS? FAT. Unless you zero the first block, in which case it will scan more. Didi > > -- Arik > ** > This email and attachments have been scanned for > potential proprietary or sensitive information leakage. > Vidius, Inc. Protecting Your Information from the Inside Out. > www.vidius.com > ** > > To unsubscribe, send >mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
Why can't the mailing list server put itself in the Reply-To: field? It's annoying! > -Original Message- > From: Yedidyah Bar-David [mailto:[EMAIL PROTECTED]] [snip] > In practice, it happened to me quite many times that a used FAT > partition was mke2fsed, used (as ext2), and then mounted as > FAT without > any errors, by both Linux and Windows, and in almost all > cases it looked > empty as FAT. I can also say a very similar scenario is possible with > NTFS reformatted as ext2. I have concocted this one-liner in 5 minutes and didn't test it nearly enough. Hence my disclaimer in the body of my message. What does the 'file' command say to that old-FAT-turned-ext2 FS? -- Arik ** This email and attachments have been scanned for potential proprietary or sensitive information leakage. Vidius, Inc. Protecting Your Information from the Inside Out. www.vidius.com ** To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
Hi all, First I want to thank everybody for the time & effort, ( although some responses show, some guys did NOT spend enough time reading my problem all the way {:< ) Since no one gave me a good answer, (except for Muli's, which was my idea to begin with) I tried to look for the way install-disc does it in rescue mode, BUT I never before read Python code. So I am guessing /usr/lib/anaconda/partitioning.py, is responsible for that. Anyone cares to check it ? PS no need to CC me in person, I'm on the list, & it floods my mailbox. TIA. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003 at 05:49:26PM +0200, Muli Ben-Yehuda wrote: > On Mon, Feb 17, 2003 at 05:48:07PM +0200, Nadav Har'El wrote: > > > Note, by the way, that newer distributions (such as Redhat 8) use Grub, > > not LILO, so anything relying on the structure of a lilo boot record > > isn't foolproof either. > > I never investigated this, so take it with a grain of salt, but I > believe that the boot record structure is standardized and even *gasp* > documented. Actually, the opposite is true; in all native linux file systems, the first block (which is reserved for a boot record) is completely unused. Sorry for replying to 2 messages at once, but this is also in reply to a message of Arik Baratz: make a simple test: make some file # dd if=/dev/zero of=test1 bs=100k count=1 create a DOS filesystem on it (which does use the boot record as a superblock) # mkdosfs test1 Then create on it an ext2 file system # mke2fs test1 (reply 'y' to 'test1 is not a block special device. Proceed anyway?') then try to loopback mount it # mkdir test1.d # mount -o loop test1 test1.d Then check how it was mounted # mount | grep test1.d and you'll see that it was (wrongly!) recognized and mounted as FAT (probably vfat). Also file(1) will say it's FAT. However, # mount -o loop -t ext2 test1 test1.d will also work! I did not go deeply into the layouts of both, but there is clearly no collision with empty FSes (at least in the sizes I tried). In practice, it happened to me quite many times that a used FAT partition was mke2fsed, used (as ext2), and then mounted as FAT without any errors, by both Linux and Windows, and in almost all cases it looked empty as FAT. I can also say a very similar scenario is possible with NTFS reformatted as ext2. Conclusions: 1. You can't guess the type of a filesystem by looking at its beginning. You have to try to mount it, and in some cases, think quite a lot before deciding. 2. If you intend to reformat a used FAT partition as ext2, make sure you manually empty the first block (e.g. with dd), or you risk having Windows try to do bad things to it when mounting/checking it (unless it won't ever see windows again and you mount it only from fstab where you write its type manually). > > = > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003 at 05:02:59PM +0200, Uri Itscowits wrote: > Hi there, > > I need to guess which is the root filesystem ( on GNU/Linux OC), > while all partitions are still unmounted. > > I could of course mount each in turn, and look for /etc/fstab or so, > but I am looking for a way which won't involve mounting, if possible. > > > Any ideas out there ? > You are not in a position where you can impose some requirements on the the fs before doing this guess work, do you? If you can impose priory requirements then one way would be to e2label the root fs with something meaningful. You don't need a fs to be mounted in order to get its e2label. E2LABEL(8) E2LABEL(8) NAME e2label - Change the label on an ext2 filesystem SYNOPSIS e2label device [ new-label ] DESCRIPTION e2label will display or change the filesystem label on the ext2 filesystem located on device. If the optional argument new-label is not present, e2label will simply display the current filesystem label. -- Shaul Karl, [EMAIL PROTECTED] e t = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
> -Original Message- > From: Arik Baratz > Sent: Monday, February 17, 2003 7:28 PM > Subject: RE: Guessing filesystem while unmounted > > > > -Original Message- > > From: Uri Itscowits [mailto:[EMAIL PROTECTED]] > > > > Hi there, > > > > I need to guess which is the root filesystem ( on GNU/Linux OC), > > while all partitions are still unmounted. > > > > I could of course mount each in turn, and look for > /etc/fstab or so, > > but I am looking for a way which won't involve mounting, if > > possible. > > > > How about: > > dd if=/dev/hda1 bs=1024 count=10 | file - > > I don't have another type of filesystem to try it on, but for > my ext3 ones it works fine even if I decrease count to as low > as 2 blocks (for 1 block 'file' doesn't recognize it). > > Disclaimer: No guarentees. Use a modern version of file(1). > > -- Arik This might let you find out the filesystem's TYPE, but it won't tell you which of the partitions is supposed to be the root filesystem. From the responses so far I think the answer is that this knowledge is in the logic of the boot loader rather than anywere else. On Solaris filesystems there is a field per partition which remembers where it was mounted last, which is very helpful but even that is not quite definitive (what if you keep multiple root filesystems, e.g. for different OS versions?) Maybe if Uri (the original poster) could describe what's the final goal he is trying to achieve we could come up with a completly different aproach? Cheers, --Amos = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
RE: Guessing filesystem while unmounted
> -Original Message- > From: Uri Itscowits [mailto:[EMAIL PROTECTED]] > > Hi there, > > I need to guess which is the root filesystem ( on GNU/Linux OC), > while all partitions are still unmounted. > > I could of course mount each in turn, and look for /etc/fstab or so, > but I am looking for a way which won't involve mounting, if > possible. > How about: dd if=/dev/hda1 bs=1024 count=10 | file - I don't have another type of filesystem to try it on, but for my ext3 ones it works fine even if I decrease count to as low as 2 blocks (for 1 block 'file' doesn't recognize it). Disclaimer: No guarentees. Use a modern version of file(1). -- Arik ** This email and attachments have been scanned for potential proprietary or sensitive information leakage. Vidius, Inc. Protecting Your Information from the Inside Out. www.vidius.com ** To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
doing : awk '{if ($2=="/")print $1}' /etc/fstab will print either the root partition (e.g. /dev/hda2 ) or the root label ( e.g. LABEL=/ ) the first is trevial, the second, can be found by running e2label on all partitions and seeing wich has the right label erez. Uri Itscowits wrote: Hi there, I need to guess which is the root filesystem ( on GNU/Linux OC), while all partitions are still unmounted. I could of course mount each in turn, and look for /etc/fstab or so, but I am looking for a way which won't involve mounting, if possible. Any ideas out there ? TIA. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003, Orna Agmon wrote about "Re: Guessing filesystem while unmounted": > > Well, as far as I know Grub does not know where your root filesystem ("/") > > lives, until it first finds the boot filesystem, finds the grub/grub.conf > > file in it (grub understands the ext2 filesystem), reads it and finds there > > the specification of where the filesystem is. > > What happens if you use another filesystem on / ? ext3, for example. Or > something that is not ext3 at all? can grub read all of them? Ext3 is basically backward-compatible with Ext2, in the sense that you can mount a clean Ext3 system as Ext2 without losing anything. So Grub didn't need to make any changes to read Ext3 filesystems Anyway, "info grub" is your friend when it comes to grub. Quoting from that info, "The currently supported filesystem types are "BSD FFS", "DOS FAT16 and FAT32", "Minix fs", "Linux ext2fs", "ReiserFS", "JFS", "XFS", and "VSTa fs". If you look on your disk, in directory /boot/grub, you'll notice files like "e2fs_stage1_5", "reiserfs_stage1_5", etc. - these are (as far as I know - I'm not really a grub expert...) the files that grub uses to be able to later read the configuration file, stage2, and finally the actual kernel, from the file system. Some of this is explained in the info file (check "hacking GRUB"). -- Nadav Har'El| Monday, Feb 17 2003, 16 Adar I 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |Boat: A hole in the water surrounded by http://nadav.harel.org.il |wood into which one pours money. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, 17 Feb 2003, Nadav Har'El wrote: > Well, as far as I know Grub does not know where your root filesystem ("/") > lives, until it first finds the boot filesystem, finds the grub/grub.conf > file in it (grub understands the ext2 filesystem), reads it and finds there > the specification of where the filesystem is. What happens if you use another filesystem on / ? ext3, for example. Or something that is not ext3 at all? can grub read all of them? -- Orna. | http://tx.technion.ac.il/~agmon I am here therefore I came. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003, Muli Ben-Yehuda wrote about "Re: Guessing filesystem while unmounted": > On Mon, Feb 17, 2003 at 05:48:07PM +0200, Nadav Har'El wrote: > > Note, by the way, that newer distributions (such as Redhat 8) use Grub, > > not LILO, so anything relying on the structure of a lilo boot record > > isn't foolproof either. > > I never investigated this, so take it with a grain of salt, but I > believe that the boot record structure is standardized and even *gasp* > documented. Well, as far as I know Grub does not know where your root filesystem ("/") lives, until it first finds the boot filesystem, finds the grub/grub.conf file in it (grub understands the ext2 filesystem), reads it and finds there the specification of where the filesystem is. This is both quite complex, and very different from what Lilo does; With lilo, you must rerun "lilo" (to change the boot sector) every time you make a change to /etc/lilo.conf. With grub, you don't have to do it, because most of the information is looked up on your boot filesystem, not on the boot sector. -- Nadav Har'El| Monday, Feb 17 2003, 16 Adar I 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |Sign seen in restaurant: We Reserve The http://nadav.harel.org.il |Right To Serve Refuse To Anyone! = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003 at 05:48:07PM +0200, Nadav Har'El wrote: > Note, by the way, that newer distributions (such as Redhat 8) use Grub, > not LILO, so anything relying on the structure of a lilo boot record > isn't foolproof either. I never investigated this, so take it with a grain of salt, but I believe that the boot record structure is standardized and even *gasp* documented. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003, Muli Ben-Yehuda wrote about "Re: Guessing filesystem while unmounted": > You can do it the same way the kernel does it in the early boot stages > - by getting the information from lilo, via the boot record. You'll > need to read and parse the boot record, though. Mounting each file > system and checking may very well be easiser... If this is supposed to be a "hack" and not something that must generally work, you can try "fdisk -l" and look for bootable Linux partitions. In many installations the root partition will be exactly of this type. On other installations, though, you might catch a special "/boot" partition, not the "/" partition, or none at all (lilo doesn't strictly need the partition to be bootable). Note, by the way, that newer distributions (such as Redhat 8) use Grub, not LILO, so anything relying on the structure of a lilo boot record isn't foolproof either. -- Nadav Har'El| Monday, Feb 17 2003, 15 Adar I 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |The world is coming to an end ... SAVE http://nadav.harel.org.il |YOUR BUFFERS!!! = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Guessing filesystem while unmounted
On Mon, Feb 17, 2003 at 04:57:52PM +0200, Uri Itscowits wrote: > Hi there, > > I need to guess which is the root filesystem ( on GNU/Linux OC), > while all partitions are still unmounted. You can do it the same way the kernel does it in the early boot stages - by getting the information from lilo, via the boot record. You'll need to read and parse the boot record, though. Mounting each file system and checking may very well be easiser... = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]